tracking paged in memory

Leif Walsh leif.walsh at
Thu Nov 14 13:00:03 PST 2013


I would like to track how much physical memory is in use by my application
(which uses jemalloc).  For allocations that are eventually served by mmap,
the physical memory used is the amount of that allocation that I've
actually touched, rounded up to the page size.  For smaller allocations
(i.e. those of which I can fit many in a single page), I only want to track
the actual size of the allocation because I'll sum the sizes for each
allocation.  I would like to figure out what this threshold is, i.e. what
is the allocation size such that for all allocations of at least that size,
only a portion of the allocation may be paged in, based on how much of it
I've actually touched?

I believe that this number is exactly the page size, for jemalloc, because
I believe allocations of at least the page size are all aligned to at least
the page size.  Is this correct?  Is there some configuration parameter I
can access through mallctl, or should I just trust what I get from

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the jemalloc-discuss mailing list