Garbage collection

Vlad Dumitrescu vlad.dumitrescu@REDACTED
Fri Aug 27 12:01:47 CEST 1999


I will try to look closer at the existing collector... it is an interesting
area. Difficult, but worth trying, I think. Only I have the time! :-)

>Allocating a cons is done as:
>uint32 *mem = p->htop;
>p->htop += 2;
>This is fast, 

The allocation is fast, but the collection will be slower!

> if the Boehm collector should be used, we
>need to replace this with:
>uint32 *mem = (uint32*) malloc(2);
>which is slow, extremely slow.

true, but the extra time is distributed, instead of a long collection phase.
Besides, as you say, hacks can be used - line allocating a bunch of cells at
once, instead of one by one.

In the end, since there is no "one size fits all" solution to GC, it depends
a lot on the way typical applications/processes use memory...

Get Your FREE FlashMail Address now at
It's Free, Easy, & Fun !!!

More information about the erlang-questions mailing list