GC.sizeOf(array.ptr)

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 30 10:19:54 PDT 2014


On 9/30/14 12:01 PM, Dicebot wrote:

> I think it should be possible. That way actual block size will be simply
> considered a bit smaller and extending happen before reserved space is
> hit. But of course I have only a very vague knowledge of druntime
> ackquired while porting cdgc so may need to think about it a bit more
> and probably chat with Leandro too :)

I think it is possible, and perhaps more correct, to put the array 
append size into a separate memory block for larger sizes. The placement 
at the end works very well and has good properties for smaller sizes.

This is similar to how the flags work.

-Steve


More information about the Digitalmars-d mailing list