Array Slices and Interior Pointers

Rainer Schuetze r.sagitario at gmx.de
Mon Dec 10 23:29:54 PST 2012


On 11.12.2012 01:04, Alex Rønne Petersen wrote:
> http://xtzgzorex.wordpress.com/2012/12/11/array-slices-and-interior-pointers/
>
>
> Destroy.
>

I don't think there is a noticeable difference in detecting whether a 
pointer is pointing to the beginning of a GC memory block or somewhere 
inside it.

 > This is clearly a huge problem for type-precise garbage collection.

I don't see problems here. If a memory block is referenced, all of it 
contents remains in memory, so they are scanned with their full type 
info. Or do you want to chop off unreferenced parts of the memory block?

 From your post, it seems these are restrictions imposed by the .NET GC, 
not by slices in general. If you take a pointer to a field inside a 
struct, you will again get interior pointer. Do you want "fat pointers" 
for this as well?


More information about the Digitalmars-d mailing list