[fpc-devel] Boehm garbage collector for freepascal

Michael Van Canneyt michael at freepascal.org
Fri Nov 19 10:20:02 CET 2010

On Fri, 19 Nov 2010, Florian Klaempfl wrote:

> Am 18.11.2010 15:27, schrieb Thaddy:
>>  On 18-11-2010 13:21, Ċ½ilvinas Ledas wrote:
>>>> But it might be an advantage for some projects as the discussions
>>>> over the years implied.
>>> What about using GC for fpc itself? If it is usable for fpc, then the
>>> problem of fpc leaking memory when compilation fails with errors can
>>> be solved using GC. As a result fpc can be integrated to some IDEs
>>> without a fear or memleaks.
>>> Just a thought.
>>> Regards
>>> Zilvinas Ledas
>> It is not a very good idea to use a GC as a means to catch mistakes made
>> by a programmer.
>> These kind of mistakes can still cause memory resource related problems
>> or violations.
>> That's not why I (re)wrote my GC interface unit (again) anyway.
>> But, there is no reason why it shouldn't work.
> It works, but there is a small problem: the compiler itself is a
> nightmare for any heap manager and it shows *THE* disadvantages of GC:
> it is sloooooooooooooooooow.
> Compiling the system unit with the default heap manager:
> 0.4 sec
> with the BoehmGC port
> 98.9 sec (creates a ppu, but crashes on exit)

Imagine compiling lazarus. You can take a holiday while it's busy.

So here endeth the lesson. No more need be said ;-)


More information about the fpc-devel mailing list