News for hackers. Stuff that matters.
Re:How the Boehm Garbage Collector Works by silon4 on Saturday February 11, 2012 @01:41AM (#3578746)
If RAM is precious, you shouldn't use GC anyway. It typically has 2x memory use overhead to reduce GC performance cost.
Re:How the Boehm Garbage Collector Works by blibble on Saturday February 11, 2012 @09:15PM (#3580876)
I don't see how it would be 2x: a minimal GC would just require an additional pointer per allocation (in the worst case) for the GC roots.

malloc() has overhead too, typically immediately before the pointer it returns there's data about the allocation, such as the size of the alloc, magic for detecting bad free()'s, etc (though I guess a simple slab allocator would just need a single bit for each allocation, plus a pointer per slab).