[Issue 3284] snn linked programs never release memory back to the OS
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 22 03:20:39 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=3284
--- Comment #4 from Sobirari Muhomori <dfj1esp02 at sneakemail.com> ---
As I understand, the test is as follows:
import core.memory, core.stdc.stdio;
void main()
{
void*[100] arrays;
// allocate and free lots of 10MB arrays
foreach (ref x; arrays)
{
x = GC.calloc(10_000_000, 1);
}
foreach (ref x; arrays)
{
GC.free(x);
x = null;
}
puts("must have a small working set here");
getchar();
}
(didn't test)
i.e. the working set never shrinks, so your best strategy is not let it ever
grow.
--
More information about the Digitalmars-d-bugs
mailing list