whatever I do, things get slower and bigger
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Fri Mar 14 19:52:41 PDT 2008
Bill Baxter wrote:
> Frits van Bommel wrote:
>> Christopher Wright wrote:
>>> Robert Fraser wrote:
>>>> grep for 'delete' in the front-end code. It's not there very much :-).
>>>
>>> Maybe Walter should use the Boehm collector for the frontend?
>>
>> Doesn't he already do that? (He has often stated he uses a collector,
>> and I'm not aware of any others for C++)
>
> There's a mem.h that looks designed to potentially wrap a GC, but the
> actual implementation just calls system malloc and free.
> Contains the comment:
> /* This implementation of the storage allocator uses the standard C
> allocation package.
> */
>
> That package's mem.malloc is used in constfold.c where a lot of the CTFE
> magic happens, so maybe wiring up mem.c to Boehm would fix it. Looks
> like it wouldn't be too difficult to try out for someone who is able to
> build a working compiler. So far that does not include me. :-(
Oh, I guess that file (mem.c) was modified by Lindquist for LLVMDC (the
derivative of DMDFE I'm most familiar with).
Anyone who wants to hook DMDFE up to Boehm can probably just use that
version (<http://www.dsource.org/projects/llvmdc/browser/trunk/dmd/mem.c>).
Still, Walter claims to use a GC (see
<http://www.digitalmars.com/d/1.0/faq.html#q7_3>). Though that doesn't
specify he uses it in DMD itself, so maybe that's the source of the
misunderstanding?
More information about the Digitalmars-d-learn
mailing list