On 28.04.2011 17:32, Steven Schveighoffer wrote:

> This is not how it's implemented.  The metadata is kept in a separate page 
> from the memory itself.

  Huh? Could you please elaborate, what do you mean by "metadata" and why it 
has to be kept on a separate page?

  I've seen at least one GC implementation with free-lists and metadata 
preceding allocated block, so even most of the allocations took O(1) time 
(unless there was a shortage in memory).

> Not really.  The more objects there are to collect, the less scanning needs 
> to be done.  You only process blocks that have references to them.

  Theoretically, any heap/stack-allocated block may have references. Stack 
scanning is relatively cheap (we know its current size, and usually it is 
small), but number of objects on the heap may be quite big, and heap itself as 
well. Or do I
mistunderstood something?

/Alexander

Reply via email to