![]() |
Project
|
#include <RepresentationBench.h>
Public Attributes | |
| long long | residentBytes = 0 |
| long long | heapInUseBytes = 0 |
A point-in-time reading of what this process is holding.
residentBytes comes from /proc/self/statm and is what the operating system sees: it includes the allocator's unreturned arenas and every page the process has ever touched, so it is a generous upper bound and it never goes down when a vector is freed. heapInUseBytes comes from mallinfo2 and is what glibc believes is currently handed out to the program – much closer to the structural number and much less noisy, but blind to anything allocated outside malloc. Both are reported; neither is the truth on its own.
uordblks ALONE IS NOT THE HEAP. glibc services any request over M_MMAP_THRESHOLD (128 kB by default) with its own mmap and books it in hblkhd, not in uordblks – so a 64 MB allocation moved this counter by exactly zero until hblkhd was added. That was caught by this file's own negative control (control 11 in the benchmark self-test) and it is the reason the control exists: a memory column that cannot see 64 MB is not a memory column.
Definition at line 175 of file RepresentationBench.h.
Definition at line 177 of file RepresentationBench.h.
Definition at line 176 of file RepresentationBench.h.