why GC not work?

mzfhhhh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 6 20:21:33 PST 2015


import std.stdio;

void testGC()
{
     auto b = new byte[](1024*1024*100);
     writeln("malloc 100M!");
}

void main()
{
     foreach(i;1..100)
     {
         testGC();
     }
}
--------------------------------------
core.exception.OutOfMemoryError@(0)

win7 x86,dmd v2.066.0


More information about the Digitalmars-d-learn mailing list