Valgrind's massif tool will not profile my application

前端 未结 1 1953
眼角桃花
眼角桃花 2021-02-19 00:05

I am developing a statically-linked 64-bit C++ application on 64-bit CentOS 5.8 using the standard gcc 4.4 packages from the CentOS repositories. It appears to be using more mem

相关标签:
1条回答
  • 2021-02-19 00:27

    If the application is statically linked, it cannot be analyzed using valgrind. Valgrind works by providing it's own version of the allocation functions to your program, which it accomplishes by overriding the dynamic lookup.

    If you can dynamically link with the standard libraries (libc and libstdc++), then it should probably be able to perform the memory analysis you're looking for.

    From the Valgrind FAQ:

    Second, if your program is statically linked, most Valgrind tools won't work as well, because they won't be able to replace certain functions, such as malloc, with their own versions.

    0 讨论(0)
提交回复
热议问题