News for hackers. Stuff that matters.
Re:How the Boehm Garbage Collector Works by kmm on Friday February 10, 2012 @08:45PM (#3578286)
I've often wondered how a garbage collector can scan the entire memory in a reasonable time. The article doesn't explain that particular operation. With a quick look at the source code I couldn't figure it out either.

Can anyone enlighten me? Is it only the stack that is checked because that seems possible in a reasonable time.

Re:How the Boehm Garbage Collector Works by loeg on Friday February 10, 2012 @09:38PM (#3578411)
Boehm controls malloc; it knows where the heap is. In general, yes, the more memory you have allocated, the slower BoehmGC will be.

It checks both stack and heap.

Re:How the Boehm Garbage Collector Works by cpeterso on Friday February 10, 2012 @11:57PM (#3578613)
The GC doesn't have to scan the entire address space. It starts scanning with GC roots, memory regions known to contain pointers such as stack, heap, and global variables (registered with the GC).