www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14134] New: Free of large array does not work


          Issue ID: 14134
           Summary: Free of large array does not work
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com

If I use GC.free on a large array of data, it is not freed.


auto x = new int[10000];
assert(GC.addrOf(x.ptr) == null); // fails

The last line works in 2.066.1

If I use delete on that array, and it's an array of structs, it will call the
dtor twice on that array.

Note that x.ptr is an interior pointer because of the array padding. I'm not
sure if the old GC took this into account or what, but it seems to work.

Feb 06 2015