[plt-scheme] Collect-Garbage not enabled on Dr. Scheme?

From: Marek Kubica (marek at xivilization.net)
Date: Sat Apr 4 19:38:49 EDT 2009


Sorry, while digging in the sources I found another GC backend which is
the SenoraGC (SGC) but it is not really recommended to use and not
mentioned very much.

On Sun, 5 Apr 2009 02:10:06 +0300
emre berat nebioğlu <beratn at gmail.com> wrote:

> What are the difference between CGC and 3m.Both has some advantage or
> disadvantage ? Or It is just about running time or compilation time.

Yes, they have both some advantages and other disadvantages, for more
details you could take a look at this mail
which explains how 3m works.

> I dont know the whole issue on running time and compilation time.
> Running time is same with compilation time.?

No, to run MzScheme, you first have to compile it. At that point, you
can decide whether your to-be-compiled MzScheme should use CGC, SGC or
3m as garbage collector [1]. You then compile MzScheme with your
desired GC and then can run programs on MzScheme. The garbage collector
is fixed by this time, so you cannot just switch in the middle of the
program which Garbage Collector to use.

> For example running time of merge sort is nlogn .This nlogn include
> only time until array is sorted(I assume array is unsorted in first
> time) or include this plus "clearing shared memory".

The Big-O notation describes the time-complexity of an algorithm, not
actually how long it will take exactly. As such, your algorithm will
be O(n log n) on 3m and on CGC. The actual time that your program runs
will change too, for course but usually not in a way that you'd get
another time-complexity. What also changes is the amount of memory that
MzScheme will use while it runs your program/algorithm.

> But i just wonder about CGC and 3m. What do we exactly focus on
> "garbage collector".

On the efficient management of memory.


[1] technically, even when selecting 3m, a CGC-version of MzScheme will
be built, too

Posted on the users mailing list.