des at des.no
Thu Jan 10 02:04:13 PST 2008
Peter Schuller <peter.schuller at infidyne.com> writes:
> Dag-Erling Smørgrav <des at des.no> writes:
> > Actually, malloc(3) can use madvise(2) to notify the kernel that
> > arbitrary pages in the arena are unused and can be discarded. The
> > current implementation will do so if the H option is specified.
> However, in this context it will likely only help partially since you still
> need a full page to be free (and with a lot of programs many allocations will
> be significantly smaller than that, and I have to assume no real-life malloc
> will align all allocations to pages, or the overhead would be extreme).
Page-aligning every allocation would be supremely stupid, and jemalloc
does so only for allocations larger than a page.
Dag-Erling Smørgrav - des at des.no
More information about the freebsd-current