Heap allocation and internal pointers
Steven Schveighoffer
schveiguy at yahoo.com
Mon Jan 20 12:20:01 PST 2014
On Mon, 20 Jan 2014 14:58:12 -0500, Dmitry Olshansky
<dmitry.olsh at gmail.com> wrote:
> 20-Jan-2014 23:48, Steven Schveighoffer пишет:
>> I think this is somewhat too general. It can be GC allocated, even
>> GC-array allocated. The GC will not move around your array unexpectedly
>> without updating the pointers.
>
> But a moving collector will happily assume there are no internal
> pointers when moving and won't update them I bet.
If we have a moving GC, then we must have precise type info on every piece
of memory that points at the target, otherwise it cannot possibly move
data unsolicited. Why wouldn't that include the internal pointer?
-Steve
More information about the Digitalmars-d
mailing list