Minimize GC memory footprint
frame
frame86 at live.com
Tue Feb 9 04:05:04 UTC 2021
On Saturday, 6 February 2021 at 20:24:00 UTC, frame wrote:
> Hmmm.. with -m64 it's reporting 80 MB used, 203 MB are really
> marked as private bytes. Constant. If I use GC.minimize() it
> goes up and down and sometimes consumes more than 203 MB. Best
> is 100MB. But it doesn't leak endlessly like the 32bit variant.
Update:
Thanks to Adam's bug report:
https://issues.dlang.org/show_bug.cgi?id=21550
My poorly delivered example modified foo() runs also smooth on
32bit now:
>void foo() {
> string[] s;
>
> foreach (i; 0 .. 50_000_00) {
> s ~= "a";
> }
>
> // GC.free(s.ptr);
> GC.free(GC.addrOf(s.ptr));
>}
I think the automatic GC is also affected by this issue.
More information about the Digitalmars-d-learn
mailing list