glibc application holding onto unused memory until just before exit

前端 未结 2 2079
时光取名叫无心
时光取名叫无心 2020-12-21 05:38

I have a C++ application (gcc 4.9.1, glibc 2.17) running on Linux (Centos 7). It uses various third-party libraries, notably Boost 1.61. As the application runs, I can watch

2条回答
  •  误落风尘
    2020-12-21 05:59

    You can profile your memory allocation using valgrind --tool=massif ./executable

    Check out the documentation at http://valgrind.org/docs/manual/ms-manual.html

    Then once you have profiling data you can apply memory pools and other techniques. Since you already use Boost you can find several such tools in Boost.

提交回复
热议问题