LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Re: thoughts on malloc...

[ILUG] Re: thoughts on malloc...

Nick Murtagh murtaghn at tcd.ie
Wed Mar 27 19:09:41 GMT 2002


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 
reservation idea.

> 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 :)




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell