Projects

Jonathan P. Olson olson@mmsi.com
Thu May 4 10:13:00 GMT 2000


On Thu, 04 May 2000, Tom Tromey wrote:

>Jon> Regarding precise and copying GCs, see my comments above.  In a C
>Jon> or C++ environment I just don't see how they're justifyable.
>
>I think they still make sense.  We don't have to solve the whole
>problem, because in general we aren't going to be allocated unions or
>weird C structures using the GC.  We only have to solve the part of
>the problem relating to GCable objects -- i.e., Java objects.
>
>Tom

I disagree with the idea that only Java should get garbage collection.
Garbage collection makes most problems much simpler and makes many
problems tractable that are totally intractable without a collector.  Garbage
collection eliminates most of the complex issues of tracking down memory
leaks and makes programs much more reliable.  With CNI, there isn't really
a clear distinction between what is a C++ object and what is a Java object.
Similarly, a collector shouldn't distinguish between GCable languages and non
GCable ones.

Garbage collection isn't slow as most people who haven't used it think.  Typical
run times for collecting a 2 megabyte heap on a 130 mhz embedded StrongARM run
about 20-30 milliseconds.  With write barriers, this is all background time when
other threads are still executing.

-- 
Jon Olson, Modular Mining Systems
	   3289 E. Hemisphere Loop
	   Tucson, AZ 85706
olson@mmsi.com
Phone:	(520)746-9127
Fax:	(520)889-5790


More information about the Java mailing list