Where is my memory?
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Sun Mar 22 03:21:19 PDT 2015
On Sunday, 22 March 2015 at 09:42:41 UTC, Ozan Süel wrote:
> But why is GC (Garbage Collector) not running? Following the
> explanations in http://wiki.dlang.org/Memory_Management memory
> usage should be something around 220KB.
The GC maps memory from the underlying OS in pool sized chunks.
The smallest pool is already 4MB, so the GC doesn't trigger
before that pool is completely used, and it also can't free the
pools until it no longer contains live data.
If you want to run a collection, you need to call GC.collect,
GC.minimize unmaps Pools.
If you're running on 32-bit (the default on Windows) that loop
might pin memory because of false pointers.
Out of interest, do you intend to work on some ML library. There
exists a few math libraries, particularly estate and SciD, but
we're lacking a nice ML package.
http://code.dlang.org/?sort=updated&category=library.scientific
More information about the Digitalmars-d
mailing list