comp.lang.ada
 help / color / mirror / Atom feed
From: "John G. Volan" <John_Volan@syspac.com>
Subject: Great Circle and Ada?
Date: 1996/09/14
Date: 1996-09-14T00:00:00+00:00	[thread overview]
Message-ID: <323B1FFD.FA4@syspac.com> (raw)


Anybody around here ever heard of Great Circle, an automatic garbage
collector for C/C++ produced by Geodesic? I just stumbled upon their
web-site: <http://www.geodesic.com/>  It's described as a conservative,
incremental, real-time, thread-safe (?) garbage collector that can be
transparently linked into existing software, without having to recompile
your code (it replaces the system default versions of malloc() and
free()
with its own versions -- apparently their version of free() does
nothing).
They claim that they can automatically eliminate all memory leaks and
all premature/multiple deallocation problems, even in third party
libraries (for instance, the notoriously leaky X/Motif library).

The name "Great Circle" reminds me of Henry Baker's work on real-time
incremental garbage collection. Can anybody tell me whether there's a
connection?

The "transparent" version of Great Circle is a conservative garbage
collector: It determines which heap-allocated objects are still
accessible,
by searching through memory for any 32-bit value that contains an
address
on the heap. Obviously, this scheme can miss some garbage if a
non-pointer bit-pattern happens to look like a heap address.

There's also a "wrapped" version of Great Circle that's faster and
more precise, but it requires you to rewrite your code to make use of 
a garbage collected "smart pointer" class template (this is only for
C++,
of course).

It seems to me that it would be fairly straightforward to use the
transparent form of Great Circle with the GNAT compiler. (The way I
understand it, GNAT translates an Ada allocator into a call to malloc(),
and Ada.Unchecked_Deallocation into free().)  Has anybody tried this,
and if so, what results did you get?

Another possibility, which would take a lot more work, would be to map
Ada access types into Great Circle smart pointers. (Maybe someone could
experiment with the GNAT compiler to do this. Anybody already at it?)
As long as a programmer remained within the abstractions of Ada and
didn't venture into Unchecked_Conversions etc., the garbage collector
would always know the location of every access value.

I'm wondering whether this product is in fact thread-safe. If so, 
does it perform correctly and/or efficiently in the presence of Ada95
tasking. They claim it's great for real time (a GC pause supposedly
can be reduced down to a microsecond), but I have my doubts.

------------------------------------------------------------------------
Internet.Usenet.Put_Signature 
  (Name => "John G. Volan",  Home_Email => "John_Volan@syspac.com",
   Employer => "S.A.I.C.",   Work_Email => "John_Volan@dayton.saic.com",
   Slogan => "Ada95: The World's *FIRST* International-Standard OOPL",
   Disclaimer => "My employer never defined these opinions, so using " &
     "them is totally erroneous...or is that a bounded error now? :-)");
------------------------------------------------------------------------




             reply	other threads:[~1996-09-14  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-14  0:00 John G. Volan [this message]
1996-09-15  0:00 ` Great Circle and Ada? Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1996-09-17  0:00 Lars Farm
1996-09-17  0:00 ` Robert A Duff
1996-09-17  0:00   ` Norman H. Cohen
1996-09-18  0:00     ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox