Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-11

Boehm garbage collector for freepascal

17 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thaddy

As I promised Marco,

You can find boehm garbage collector bindings for freepascal, incl. replacement memory manager at
http://freepascal.thaddy.co.uk/fpc_boehm_gc.zip
For win32 a prebuild dll is included
For other platforms you need to build the gc library from source (included) Please test, I am especially curious how it behaves on other platforms. freepascal.thaddy.co.uk/fpc_boehm_gc.zip

I Also have a question:
(After you played with the example and read the docs) Suppose I want a GC version of freepascal, would it be enough to patch TObject.InitInstance/TObject.FreeInstance for finalization and adapt heap.inc and do a make clean/make all?
Tobject descendants may require finalization before the garbage collector cleans them, hence my question.

Or do I need more steps?

Regards,

Thaddy

Reply by email

Marco van de Voort
to Thaddy

In our previous episode, Thaddy said:

Show quoted text 11 lines
You can find boehm garbage collector bindings for freepascal, incl. replacement memory manager at http://freepascal.thaddy.co.uk/fpc_boehm_gc.zip For win32 a prebuild dll is included For other platforms you need to build the gc library from source (included) Please test, I am especially curious how it behaves on other platforms. freepascal.thaddy.co.uk/fpc_boehm_gc.zip I Also have a question: (After you played with the example and read the docs)

Oh. Am I supposed to do that? :-)

(I just collect info about this subject because it is a recurring white elephant. Regularly there is talk about it, but nobody has seen a working implementation, and nobody knows if proof of implementation on C++ really does translate to Delphi. (like the finalization bit below)

I myself are not interested in GC in my current job (but was in my previous webapp job)

Suppose I want a GC version of freepascal, would it be enough to patch TObject.InitInstance/TObject.FreeInstance for finalization and adapt heap.inc and do a make clean/make all?

I was thinking that one would install a heapmanager with a freemem that does nothing. Unfortunately the prototype can't zero the pointer (like freeandnil does)

All allocations are eventually getmem/freemem, so redirecting getmem to the gc's prefered memory allocation and making freemem a no-op would be enough I guess.

Tobject descendants may require finalization before the garbage collector cleans them, hence my question.

Hmm, yes. That means indeed the GC must be able to call a callback on a block that must be freed, and some call to finalize must be made there. But will you have enough context to do so?

Or will we simply not finalize and let the GC collect ansistrings and the like too? I always assumed that.

Reply by email

Michael Van Canneyt
to Marco van de Voort
Marco van de Voort wrote 44 lines
In our previous episode, Thaddy said: > > You can find boehm garbage collector bindings for freepascal, incl. > replacement memory manager at > http://freepascal.thaddy.co.uk/fpc_boehm_gc.zip > For win32 a prebuild dll is included > For other platforms you need to build the gc library from source (included) > Please test, I am especially curious how it behaves on other platforms. > freepascal.thaddy.co.uk/fpc_boehm_gc.zip > > I Also have a question: > (After you played with the example and read the docs) Oh. Am I supposed to do that? :-) (I just collect info about this subject because it is a recurring white elephant. Regularly there is talk about it, but nobody has seen a working implementation, and nobody knows if proof of implementation on C++ really does translate to Delphi. (like the finalization bit below) I myself are not interested in GC in my current job (but was in my previous webapp job) > Suppose I want a GC version of freepascal, would it be enough to patch > TObject.InitInstance/TObject.FreeInstance for finalization and adapt > heap.inc and do a make clean/make all? I was thinking that one would install a heapmanager with a freemem that does nothing. Unfortunately the prototype can't zero the pointer (like freeandnil does) All allocations are eventually getmem/freemem, so redirecting getmem to the gc's prefered memory allocation and making freemem a no-op would be enough I guess. > Tobject descendants may require finalization before the garbage > collector cleans them, hence my question. Hmm, yes. That means indeed the GC must be able to call a callback on a block that must be freed, and some call to finalize must be made there. But will you have enough context to do so? Or will we simply not finalize and let the GC collect ansistrings and the like too? I always assumed that.

You must finalize, because ref. counting of interfaces etc. need to be taken care of. Interfaces may live outside the FPC memory space, and are therefor not accessible to the GC. If you want to let the GC collector handle all that, you're in essence copying what the the destructor does, and that seems like a wrong approach.

Michael.

Reply by email

Thaddy
to Marco van de Voort: In our previous episode, Thaddy said: Oh. Am I supposed to do that? :-) (I just collect…
Marco van de Voort wrote
Oh. Am I supposed to do that? :-)

Yes, please :-) , but others are welcome...

Show quoted text 5 lines
(I just collect info about this subject because it is a recurring white elephant. Regularly there is talk about it, but nobody has seen a working implementation, and nobody knows if proof of implementation on C++ really does translate to Delphi. (like the finalization bit below)

This is such a working example, including the finalization part. Note: this requires objects/classes that need finalization to be registered.

Show quoted text 9 lines
I was thinking that one would install a heapmanager with a freemem that does nothing. Unfortunately the prototype can't zero the pointer (like freeandnil does) All allocations are eventually getmem/freemem, so redirecting getmem to the gc's prefered memory allocation and making freemem a no-op would be enough I guess.

No, it isn't, well isn't always.

Show quoted text 9 lines
> Tobject descendants may require finalization before the garbage > collector cleans them, hence my question. Hmm, yes. That means indeed the GC must be able to call a callback on a block that must be freed, and some call to finalize must be made there. But will you have enough context to do so? Or will we simply not finalize and let the GC collect ansistrings and the like too? I always assumed that. ______

I took great pains in making sure ansistrings are released correctly (see example). This took some effort and reading
and still I am not sure I am correct. The memory allocation abstraction for Freepascal differs from Delphi.
And there is enough context because the finalizer calls the destructor, not free. Hence my question about adapting Tobject. I might be *very* wrong, though!

Reply by email

Thaddy
to Michael Van Canneyt: You must finalize, because ref. counting of interfaces etc. need to be taken care of.…
Michael Van Canneyt wrote 10 lines
You must finalize, because ref. counting of interfaces etc. need to be taken care of. Interfaces may live outside the FPC memory space, and are therefor not accessible to the GC. If you want to let the GC collector handle all that, you're in essence copying what the the destructor does, and that seems like a wrong approach. Michael.

Indeed. Therefore I want to adapt the rtl at the earliest point possible where a pointer to object is available to mark for finalization. It seems this is in Tobject.InitInstance. But afaik this will work with the code provided. See example.
For AnsiStrings it seems sufficient to take into account the extra ptrint that registers the size of an entity.

Reply by email

Thaddy
to Michael Van Canneyt: You must finalize, because ref. counting of interfaces etc. need to be taken care of.…
Michael Van Canneyt wrote 10 lines
You must finalize, because ref. counting of interfaces etc. need to be taken care of. Interfaces may live outside the FPC memory space, and are therefor not accessible to the GC. If you want to let the GC collector handle all that, you're in essence copying what the the destructor does, and that seems like a wrong approach. Michael.

Actually, I am *calling* the destructor in the finalizer, not copying it. AFAIK this should take care of it.
Regarding refcounted strings: the way it is implemented here doesn't carry any prize for beauty, but it seems to work alright. As Marco stated, and is provided, there is a need for a callback and that is exactly what Boehm has provided for.
I am *very* unsure about the correct implementation, though. Critique is highly appreciated and necessary before I attempt to create a full GC'ing (my rather ambitious goal) FPC version.

Regards,

Thaddy

Reply by email

Hans-Peter Diettrich
to Thaddy
Actually, I am *calling* the destructor in the finalizer, not copying it. AFAIK this should take care of it.

IMO destructors and finalizers are mutually exclusive, I remember a note like "Why a garbage collector never should call an destructor", that at least applies to mark-sweep GC.

It should be clear that a destructor, that destroys further (owned) objects, will confuse an mark-sweep garbage collector, since it can invalidate the marks. Consequently all allocated memory areas/objects should be flagged as either managed or unmanaged. Then FreeMem can decide, inside the memory manager, whether the memory block should be released immediately (if unmanaged), or should be marked for later deletion (if managed). Dunno about the concrete Boehm implementation...

Regarding refcounted strings: the way it is implemented here doesn't carry any prize for beauty, but it seems to work alright.

That's a different GC model, not mark-sweep. Eventually the un/managed flag has to be extended, into managed-by-refcount and managed-by-mark-sweep.

As Marco stated, and is provided, there is a need for a callback and that is exactly what Boehm has provided for.

That callback may be intended to perform further *finalization*, not *destruction*, of related objects. The FPC/Delphi Finalize procedures and destructors should not be confused with finalizers in the GC sense. A GC finalizer only should clear (Nil) references to other objects, and possibly mark the object as finalized, what might be done after the callback returns. Then the collector phase of the GC will know which objects really can be removed from memory, and will not have to be taken into account in the next mark phase.

DoDi

Reply by email

Thaddy
to Hans-Peter Diettrich

The rants about finalizers versus destructors in the context of GC are a many.
Let me make it clear that these discussions almost invariably presume the context of the C(++) language.
The main thing being that C++ allocates objects/classes from the stack by default. In Freepascal (in Delphi mode or objfpc mode) objects/classes are guaranteed to be allocated from the heap. In the context of stack allocated objects there is (are many!) a conflict between finalizers and destructors which makes them mutually exclusive..
In de context of heap allocating languages like Freepascal or Delphi these conflicts do not exist, not even in a serialized context. Those arguments are therefore invalid. Even local objects are from the heap in Freepascal, as soon as the object goes out of scope it is marked for deletion by the GC
For a good understanding why this is so you have to understand how a destructor in object pascal relates to the finalzer as used in the Boehm GC. The finalizer is called - and only called - if the memory (object) is already marked for deletion. This means the memory is technically already unreachable.
It is perfectly legal to call a destructor on such an object even in a asynchroneous context..

Hans-Peter Diettrich wrote 9 lines
Thaddy schrieb: > Actually, I am *calling* the destructor in the finalizer, not copying > it. AFAIK this should take care of it. IMO destructors and finalizers are mutually exclusive, I remember a note like "Why a garbage collector never should call an destructor", that at least applies to mark-sweep GC.

This is *only* true for stack allocated objects like in C++ but definitely not for heap allocated objects like in freepascal and Delphi. Strongly put: the fact that Freepascal allocates from the heap makes it extremely suitable for the GC.
If you read the documentation for the Boehm collector you can deduct that. (Also in the context of the Java discussions on the same subject.)

Show quoted text 8 lines
It should be clear that a destructor, that destroys further (owned) objects, will confuse an mark-sweep garbage collector, since it can invalidate the marks. Consequently all allocated memory areas/objects should be flagged as either managed or unmanaged. Then FreeMem can decide, inside the memory manager, whether the memory block should be released immediately (if unmanaged), or should be marked for later deletion (if managed). Dunno about the concrete Boehm implementation...

This is not the case: When the finalizer is called the memory (always allocated from the heap) is already outside of the scope of the normal program flow and can safely be released by the GC. Mark/sweep will work safely.
The Boehm GC is smart enough to "see" the live pointers that nest inside the main object.

Show quoted text 7 lines
> Regarding refcounted strings: the way it is implemented here doesn't > carry any prize for beauty, but it seems to work alright. That's a different GC model, not mark-sweep. Eventually the un/managed flag has to be extended, into managed-by-refcount and managed-by-mark-sweep.

Mark sweep will - empirically, granted - work after f.e. the refcount is 0, not before. The inner workings of the string mechanism are simply not changed. That's mainly why I consider my solution not pretty, btw. And, frankly, I am not sure, as I wrote before.

Show quoted text 12 lines
> As Marco stated, and is provided, there is a need for a callback and > that is exactly what Boehm has provided for. That callback may be intended to perform further *finalization*, not *destruction*, of related objects. The FPC/Delphi Finalize procedures and destructors should not be confused with finalizers in the GC sense. A GC finalizer only should clear (Nil) references to other objects, and possibly mark the object as finalized, what might be done after the callback returns. Then the collector phase of the GC will know which objects really can be removed from memory, and will not have to be taken into account in the next mark phase.

For a heap based language there is no conflict between a finalizer and a destructor. It is perfectly acceptable to call a destructor in the finalizer, because it doesn't touch the the
standard " objections" .

Reply by email

Hans-Peter Diettrich
to Thaddy
Show quoted text 7 lines
The rants about finalizers versus destructors in the context of GC are a many. Let me make it clear that these discussions almost invariably presume the context of the C(++) language. The main thing being that C++ allocates objects/classes from the stack by default. In Freepascal (in Delphi mode or objfpc mode) objects/classes are guaranteed to be allocated from the heap.

I doubt that this is a reasonable argument, since stack objects do not deserve any GC at all.

Show quoted text 5 lines
In the context of stack allocated objects there is (are many!) a conflict between finalizers and destructors which makes them mutually exclusive.. In de context of heap allocating languages like Freepascal or Delphi these conflicts do not exist, not even in a serialized context.

Except for Object, the deprecated C-style object implementation.

Those arguments are therefore invalid. Even local objects are from the heap in Freepascal, as soon as the object goes out of scope it is marked for deletion by the GC

That's not a general rule, unless there exist language features that control (disallow) e.g. passing of according references to subroutines, or storing them in other data structures (lists...) of extended lifetime.

Show quoted text 8 lines
For a good understanding why this is so you have to understand how a destructor in object pascal relates to the finalzer as used in the Boehm GC. The finalizer is called - and only called - if the memory (object) is already marked for deletion. This means the memory is technically already unreachable. It is perfectly legal to call a destructor on such an object even in a asynchroneous context..

Maybe, but what about owned objects and other references, still residing in an unreachable object? And how to prevent multiple destructor calls?

Show quoted text 8 lines
> IMO destructors and finalizers are mutually exclusive, I remember a > note like "Why a garbage collector never should call an destructor", > that at least applies to mark-sweep GC. > This is *only* true for stack allocated objects like in C++ but definitely not for heap allocated objects like in freepascal and Delphi. Strongly put: the fact that Freepascal allocates from the heap makes it extremely suitable for the GC.

Distributed object *references*, in the stack, the objects themselves, and in global variables, are the biggest problem in GC. The distinction between stack and heap objects in contrast is not a problem, since the GC knows about all heap objects.

Show quoted text 13 lines
If you read the documentation for the Boehm collector you can deduct that. (Also in the context of the Java discussions on the same subject.) > It should be clear that a destructor, that destroys further (owned) > objects, will confuse an mark-sweep garbage collector, since it can > invalidate the marks. Consequently all allocated memory areas/objects > should be flagged as either managed or unmanaged. Then FreeMem can > decide, inside the memory manager, whether the memory block should be > released immediately (if unmanaged), or should be marked for later > deletion (if managed). Dunno about the concrete Boehm implementation... > This is not the case: When the finalizer is called the memory (always allocated from the heap) is already outside of the scope of the normal program flow and can safely be released by the GC.

Finalization of an object can occur at any time, not only during GC.

Mark/sweep will work safely.

Safety by the conservative approach (if in doubt, let it survive).

The Boehm GC is smart enough to "see" the live pointers that nest inside the main object.

At a high cost, as long as it has to guess what *are* pointers.

Show quoted text 11 lines
>> Regarding refcounted strings: the way it is implemented here doesn't >> carry any prize for beauty, but it seems to work alright. > > That's a different GC model, not mark-sweep. Eventually the un/managed > flag has to be extended, into managed-by-refcount and > managed-by-mark-sweep. > Mark sweep will - empirically, granted - work after f.e. the refcount is 0, not before. The inner workings of the string mechanism are simply not changed. That's mainly why I consider my solution not pretty, btw. And, frankly, I am not sure, as I wrote before.

I don't see any need why refcounted objects should be subject to another garbage collection. When a mark-sweep GC tries to deal with e.g. dynamic strings or arrays, the result can only be *false* references to other objects. That's why both managers should work independently.

For a heap based language there is no conflict between a finalizer and a destructor. It is perfectly acceptable to call a destructor in the finalizer, because it doesn't touch the the standard " objections" .

Your stack argument is meaningless, for several reasons. Stack objects never are recognized and handled by mark-sweep GC, their "destructors" don't deallocate their FreeInstance does nothing in the Pascal Class model - as it *must* do in a GC environment - there is no more difference between the destruction of stack and heap objects.

Nonetheless I'm still in doubt, whether (typical) destructor code is applicable as a finalizer, since it may affect other objects by calling their destructors. We all know about problems with multiple calls to the destructor of an object, when the destructor does not finalize (nil) all references to the destroyed objects; this is common practice, because a destroyed object goes away immediately after the destructor has been called, and some people argue that the use of FreeAndNil in an destructor indicates a bad design! And now you are going to call the destructor of an object during finalization, without knowing whether that destructor already has been called! :-(

The real finalization problems reside elsewhere, see the Boehm documentation about the finalization semantics, how to avoid loops etc.
- all that is related to heap objects as well.

DoDi

Reply by email

Michael Schnell
to Thaddy: You can find boehm garbage collector bindings for freepascal, incl. replacement memory…

On 11/15/2010 02:04 PM, Thaddy wrote: ...

If you want to extend a compiler to allow for garbage collection, would it not be appropriate to have it manage an additional type of variables that is supposed to be "garbage collection enabled" pointers and have it always create double indirect accesses to this type of variables. The "garbage collection enabled memory allocator" would manage a list of these variables and see that the value of the pointer is an entry in this list that again is a pointer to the instance. Now that garbage collector can do it's work without the user program knowing about this.

Of course there are lots of issues regarding maybe excessive latency when the garbage collector is running (and thus the main program is in a hold-off) and with threads ,,,

-Michael

Reply by email

Thaddy
to Michael Schnell
Michael Schnell wrote 11 lines
On 11/15/2010 02:04 PM, Thaddy wrote: ... If you want to extend a compiler to allow for garbage collection, would it not be appropriate to have it manage an additional type of variables that is supposed to be "garbage collection enabled" pointers and have it always create double indirect accesses to this type of variables. The "garbage collection enabled memory allocator" would manage a list of these variables and see that the value of the pointer is an entry in this list that again is a pointer to the instance. Now that garbage collector can do it's work without the user program knowing about this. t3

Well, basically, all these things have already been answered by the way the Boehm GC's architecture has evolved. Threading is possible (Thread local (sub) allocator/collector), you can mark memory as not GC'd etc. The Boehm GC is a very mature piece of software engineering, that's why f.e. it's the default for mono and the GNU static - not the bytecode - java compiler. Note the static: this paradigm is very close in implementation because this also assumes heap allocated objects etc. In general, I have read nothing new that isn't already taken care of. The implementation is pretty straight forward.
Reading the documentation and historical conversations is another thing altogether.

As it stands, my version as presented is not thread safe, though a simple recompile BoehmGC with treading enabled is enough. The Freepascal interface does not change.
There is even a mechanism in the Boehm GC that allows to recognize what kind of memory is requested, by registering the type of an object, not the object itself, to the collector.
This is extensively used in the static java compiler f.e. and thoroughly documented.

Also: a GC is not as reliable for for example real-time applications where indeed the GC can interfear, but there are calls to delay collection and to perform the collection immediately. Modern measurements show - and most in the know agree - that in applications with many small allocations a GC may be faster, more performant, than classic alloc/free.
There is a performance penalty only with large allocations (at least under windows, I386) with blocks of 100K+ but you can always allocate this manually if it becomes a problem.
And in the standard Delphi memory manager these big allocations are also deferred to OS calls (virtual alloc family of win32 calls)

Boehm GC is not slow, on the contrary: the fact that it is conservative makes it faster. More specific in real applications (specially server applications, database handling etc) it may be faster, at the expense of memory resources, but that is a given for many a speed-up anyway.. Boehm GC can be compiled for thread safety very simply (1 compile switch).

To summarize: what you write/propose is already in there :)

I have rather good initial results with it, even compiling medium/large Freepascal projects with it, f.e. fpGUI and fpGUI designer ;-) :-)

I never proposed to make the GC mm the default, though. But it might be an advantage for some projects as the discussions over the years implied. When you carefully read the historical trail you realize most of the arguments here are really old school and already falsified by the Boehm community (except for stack based object allocations that is!)

Thaddy

Reply by email

Žilvinas Ledas
to Thaddy
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

Reply by email

Michael Schnell
to Thaddy: Well, basically, all these things have already been answered by the way the Boehm GC's…
Thaddy wrote
To summarize: what you write/propose is already in there :)

OK, great, its there, but how to get it _here_ ?

To make it useful FPC would need some the appropriate keywords (such as "GarbageControlled") for creating this type of variables, and it would need to use them in a double-indirect way (or use a function call into the garbage-control-RTL when creating and dumping these variables to make them known) to allow for the Garbage Collector to do it's work while the program is temporarily stalled.

Show quoted text 5 lines
I have rather good initial results with it, even compiling medium/large Freepascal projects with it, f.e. fpGUI and fpGUI designer ;-) :-)

Sounds good so far.
-Michael

Reply by email

Thaddy
to Žilvinas Ledas: What about using GC for fpc itself? If it is usable for fpc, then the problem of fpc…
Show quoted text 11 lines
> 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.
The Lazarus IDE for example is a different proposal and more difficult to implement: You have to get rid of the suballocator mm to have it working properly and efficently (The Lazarus IDE uses a memory manager on top, not in place, of the default memory manager.) At least the Boehm GC would have a performance penalty in this case (large blocks) - being the lower level one -, but the reason it - the sub allocator - is there is because of performance in the first place and I would not be surprised at all if the Boehm GC would perform equal or better after the removal of this sub allocator.

Regards,

Thaddy

Reply by email

Florian Klaempfl
to Thaddy
Thaddy wrote 20 lines
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)

And no, FPC does not a lot huge memory allocations, just a lot of small ones and I mean really a lot :)

Reply by email

Michael Van Canneyt
to Florian Klaempfl
Florian Klaempfl wrote 29 lines
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 ;-)

Michael.

Reply by email

Žilvinas Ledas
to Florian Klaempfl: It works, but there is a small problem: the compiler itself is a nightmare for any heap…
Show quoted text 7 lines
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)

Nice! I had such a feeling, so it was more like hypothetical proposal ;)

Regards
Zilvinas Ledas

Reply by email