I am trying to research the memory usage of a large multithreaded server. According to mallinfo (), I get arena=350M and fordblks=290M , which means that most of the space is actually lost inside malloc() . The malloc_info() function provides a good XML data structure, which is supposed to be self explanatory. However, can someone explain to me
- Is heap
0 special? Is this the main arena in which everyone else lives? - Are the selected fragments
<size from=.../> free / available, or both? - What is a
<system> element? Memory allocated with mmap()/sbrk() ? - What is an
<aspace> element? Available memory? - What about
<aspace type="mprotect" .../> ?
Just for starters, I would like to be able to display the shared memory allocated by the application, i.e. everything selected and not yet freed, according to what malloc() thinks.
source share