Mail Archives: djgpp-workers/2000/05/07/02:00:06
Eli Zaretskii wrote:
> Another approach would be to profile the slow GC and see what takes
> time there. It's possible that nobody worked on it seriously enough
> because everybody uses the other techniques.
That's very likely.
> > so C++ and the other languages
> > that are being converted to use GC can work in an acceptable amount of time.
>
> Isn't the C compiler affected by this as well?
Of course - I used C compiler in my example. But for C++, things would be
much worse. In my example GC was run only once to reduce memory usage from
5 to 1 MB. In C++ it would be run many times to reduce mem usage from 50 or 100MB
to 10 MB...
> However, if alignment is the only difference between `valloc' and
> `malloc', I don't quite see what's the big difference between them
> that would explain such a huge run-time penalty. Can someone explain?
Because they're used in two different GC implementations: gc-simple uses
malloc and gc-page uses mmap or valloc.
Laurynas Biveinis
- Raw text -