GC, memory leaks and 32/64 bit

Druzhinin Alexandr news at digitalmars.com
Tue Mar 12 22:46:12 PDT 2013


On 12.03.2013 20:23, Benjamin Thaut wrote:
> 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
I tried to build dmd 2.062 + Rainer's druntime + phobos 2.062 + some 
code manipulation to make it compiles but I got undefined symbols (BTW 
may I link it with druntime 2.062 (besides Rainer's one) to get these 
symbols?).
I guess it would be better to use 2.061 but my application doesn't 
compile with it now, will try it later. And it would be very nice to 
have some instructions about using alternative gc.


More information about the Digitalmars-d-learn mailing list