Derek Simkowiak <[EMAIL PROTECTED]> writes: > I have recently learned that free() (or g_free() ) does not return > the freed memory to the operating system until after the program is > killed. So if I g_malloc() a ton of memory, and then g_free() it, my > program is still using a crapload of RAM until it is killed. > > Is it any different with a GAllocator? I.e., if I need to Yes, because mem chunks can only be recycled for allocations of the same type/size, while memory allocated by malloc() can be recycled for any future malloc(). This is why mem chunks are theoretically faster, because you can simply pop the top free chunk off a stack, instead of trying to find a free chunk of the right size. However in practice GNU libc malloc() can find a free chunk about as fast as glib's mem chunk stuff can, because GNU libc malloc() is an insanely scary hyperoptimized thing. Havoc -- To unsubscribe: mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
- [gtk-list] Re: Statusbar Overflow? Havoc Pennington
- [gtk-list] Re: Statusbar Overflow? Derek Simkowiak
- [gtk-list] Re: Statusbar Overflow? Havoc Pennington
- [gtk-list] GMemChunk for skip lists Derek Simkowiak
- [gtk-list] Another (stupid) GAllocator... Derek Simkowiak
- [gtk-list] Re: Another (stupid) GAlloc... Havoc Pennington
- [gtk-list] Re: GMemChunk for skip list... Tim Janik
- [gtk-list] Whence GdkWChar Derek Simkowiak
- [gtk-list] Re: Whence GdkWChar Owen Taylor
- [gtk-list] GAllocator vs. g_free (was:... Derek Simkowiak
- [gtk-list] g_memmove() (another RAM qu... Havoc Pennington
- [gtk-list] g_memmove() (another RAM qu... Derek Simkowiak
- [gtk-list] Re: g_memmove() (another RA... Tim Janik
- [gtk-list] Re: g_memmove() (another RA... Erik Mouw
- [gtk-list] Re: GAllocator vs. g_free (... Tim Janik
- [gtk-list] Re: GAllocator vs. g_free (... Valdis . Kletnieks
- [gtk-list] Re: GAllocator vs. g_free (... Derek Simkowiak
- [gtk-list] Gapped Text Buffer Derek Simkowiak
- [gtk-list] right click menu david rohde
- [gtk-list] Re: right click menu Matthew Cordes
- [gtk-list] Re: right click menu Emmanuel DELOGET