GC, memory leaks and 32/64 bit

Benjamin Thaut code at benjamin-thaut.de
Tue Mar 12 06:23:42 PDT 2013


Am 12.03.2013 14:07, schrieb bearophile:
> Alexandr Druzhinin:
>
>> 32 bit versions (using dmd and gdc, win7/ubuntu 12.04) of my
>> application always leak very fast. But 64 bit version (ubuntu 12.04
>> only, win7 segfaults) works stable without any leaks. I'm curious is
>> there some workaround or I have to wait for GC improvement to build
>> 32bit version, without choice?
>
> This difference is caused by the difference in pointer space size
> coupled with the nature of a conservative GC.
> The "workarounds" are not easy, like allocating your largest arrays from
> the C heap.
> The past Summer Of Code was worked on a much more precise GC (but not
> fully precise) meant to reduce this problem a lot on 32 bit systems, but
> nothing solid has so far come out of that. It probably needs to be
> polished, tested, etc.
>
> Bye,
> bearophile

Thats not correct. Rainer Schuetze has finished it and is using it for 
VisualD. You can get a version of druntime which the percise GC from his 
github branch https://github.com/rainers/dmd

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list