User: Password:
|
|
Subscribe / Log in / New account

The SLUB allocator

The SLUB allocator

Posted Apr 19, 2007 10:20 UTC (Thu) by jfj (guest, #37917)
In reply to: The SLUB allocator by rwmj
Parent article: The SLUB allocator

One problem with GC is that resources are not freed As Soon As Possible. For memory that may be a win, but there are other things: File descriptors, inodes, locks, etc. These things Must be freed as soon as possible, and no you can't do that periodically every time GC is triggered. So since the code is there, it is also better to free the memory as well.

I mean, why do: close the file descriptor, but leave the memory for the GC.

GC collection would then have to traverse the entire object space and kill all the caches for good! Just free the damn thing when you're there.


(Log in to post comments)

The SLUB allocator

Posted Jul 5, 2010 11:14 UTC (Mon) by marcH (subscriber, #57642) [Link]

You just got me thinking... is there any language giving you both? I mean, sometimes GC is best. Some other times in the very same piece of sofware, "Just free the damn thing when you're there" is best.

So can I have both please?

The SLUB allocator

Posted Jul 5, 2010 14:49 UTC (Mon) by nye (guest, #51576) [Link]

D seems like a good choice, in many ways.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds