http://d.puremagic.com/issues/show_bug.cgi?id=9092
Rainer Schuetze <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution| |INVALID --- Comment #1 from Rainer Schuetze <[email protected]> 2012-11-30 01:33:27 PST --- I very much suspect that this is caused by the behaveour of large arrays that need more space than 2048 bytes: these arrays store the actual allocated length at the beginning of the block and reserve 16 bytes for that, in contrast to smaller arrays that place this information at the end of the memory block (see druntime/src/rt/lifetime.d for details). So in your case, a.ptr does not point to the start of the memory block, but 16 bytes into it, leaving a little less than the actual memory size for the array. GC.extend changes the memory block, but doesn't know about the array-semantics, so it reports back the raw size of the memory block. Your example mixes high level memory access (arrays) with low level functions (GC.extend), I don't think that is a good idea. Instead, use GC.malloc for your first allocation. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
