This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][RFC] Allow explicit shrinking of arena heaps using anenvironment variable
Like Carlos, I want to hear about the motivation for this. I really
don't like adding to the plethora of environment variables and other
knobs affecting malloc. We have too many of those as it is.
The reason we're doing this in secure mode is clear to me. If in
practice the performance of the mmap is not significantly worse than
the madvise on then I'd say we should do it unconditionally just to
reduce the number of code paths regardless of all else. Off hand
that seems plausible. Looking at recent Linux sources, I think the
kernel will do the TLB shoot-down (which I think is the expensive
thing) immediately on madvise. So I think Siddhesh should do some
empirical performance tests to compare the mmap and madvise paths
and report back.
Thanks,
Roland