On 03/10/06, Baruch Even <[EMAIL PROTECTED]> wrote:
answer while you write it. Though I expect that in most usage cases
memory will not be returned simply because it is impossible to do so.

Look for "mallopt()" (could find its docs only in the glibc info pages) - it controls thresholds for when trimming and mmap-based allocation kick in.

All that said - there might alternative implementations of malloc()/free() which may give better results than the "Default" for your particular situation. One which keeps coming up when Googl'ing around is Doug Lee's malloc library (dlmalloc) but I suspect it's a bit old and possibly outdated when compare to glibc's implementation. I'm also pretty sure there used to be a version by Henry Spencer too ages ago.

"apt-cache search malloc" on Debian Etch comes up with some interesting sounding packages:
libgoogle-perftools0 - libraries for CPU and heap analysis, plus an efficient thread-caching malloc
libnspr4 - Netscape Portable Runtime Library

Now back to the original question - what are you trying to achieve? Maybe with the context for that question we can give a more useful answer.

--Amos

--
"Military justice is to justice what military music is to music"

Reply via email to