Taylor R Campbell <[email protected]> writes: > Both jemalloc and glibc use sbrk in addition to mmap.
Jemalloc *can* use sbrk() in addition to mmap() if enabled at build time, but even then, it will try mmap() first, unless you explicitly configure it at runtime to prefer sbrk() over mmap(). And it's still not a meaningful measure of the amount of memory in use. > glibc and at least some versions of jemalloc use brk(p) or sbrk(-x) to > release part of the data segment back to the operating system. Which will only work if the heap is not very fragmented. DES -- Dag-Erling Smørgrav - [email protected]
