Componentizing D's garbage collector

Walter Bright newshound2 at digitalmars.com
Mon Jan 13 13:11:53 PST 2014


On 1/13/2014 12:57 PM, Brad Roberts wrote:
> The key advantage that moving gives to a GC is to allow it to have a block of
> memory that it can do allocations out of by simply bumping the pointer.  When
> that region is full, a minor collection kicks in, moving anything still alive
> out to a different block of memory, then reset the region for re-use.  Pinned
> objects == region can't be emptied for reuse.  That leads to fragmentation and
> free list maintenance and you're right back with a more typical allocator.
>
> Not to say there aren't other ways of doing things, but with random objects
> becoming pinnable puts a big damper on things unless you can identify all the
> objects that might be pinned and isolate them.  But I doubt that's really
> knowable up front.

The reason pinning doesn't particularly impede this is because pinning is rare.


More information about the Digitalmars-d mailing list