Componentizing D's garbage collector

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Mon Jan 13 13:24:25 PST 2014


On Monday, 13 January 2014 at 21:08:50 UTC, Dmitry Olshansky 
wrote:
> So what? It can't move it and as such there is nothing special 
> about it, it doesn't _cost_ anything to pin object.

Well, the advantage of compaction is that you (in theory) can 
relocate objects so that you:

1. get temporal and spatial coherency (sitting on the same page, 
to avoid paging)
2. get rid of fragmentation (less paging, requires smaller 
address space)
3. can have a faster and simpler allocator

If you start using the GC heap for "malloc" with pinning, you 
loose a lot of that? That's the cost.



More information about the Digitalmars-d mailing list