On Wednesday 27 March 2002 18:38, kevin lyda wrote:
> yes, it would reserve memory. and so yes, there's the chance for a
> memory leak. the unreserve call will unallocate any memory not used
> from the matching reserve call. so if you malloc_reserve 1024 bytes
> and then only use 100 bytes, the matching unreserve call would remove
> the reserveation for the remaining 924 bytes.
John Tobin posted a link to information about Doug Lea's malloc library.
The very last section on Lookasides seems almost similar to your
> btw, in reading the info pages on glibc it might be possible to mimic
> this functionality with either malloc hooks, free hooks or with mallopt.
> all of these are glibc specific however. it's too bad libc is so cast
> in stone - be nice if there was a c equiv to cpan.
As Doug Lea mentions on that page, you can always compile a different malloc
library into your code, and mess with that all you like :)
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!