Heap memory usage lower than resident size. How to track the leaks ? #331
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Debugging "leaking" resident size programs is always a bit of a challenge because you are dealing with underlying allocators most of the time and unless you have any visibility into those is very difficult to diagnose. You have some possibilities if you are using glibc you can use the If you are feeling adventurous, https://www.gnu.org/software/libc/manual/html_node/Malloc-Tunable-Parameters.html Another possibility is that |
Beta Was this translation helpful? Give feedback.
Debugging "leaking" resident size programs is always a bit of a challenge because you are dealing with underlying allocators most of the time and unless you have any visibility into those is very difficult to diagnose. You have some possibilities if you are using glibc you can use the
malloc_stats
call to get some statistics on the internal allocator to see if fragmentation may be a problem. Check this for more information.If you are feeling adventurous,
glibc
has a bunch of tunables that you can try to help with fragmentation if that turns out to be the case:https://www.gnu.org/software/libc/manual/html_node/Malloc-Tunable-Para…