From: dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner)
Subject: Re: Generics - Difference between ADA and Modula--3
Date: 5 Feb 2001 21:46:45 GMT
Date: 2001-02-05T21:46:45+00:00 [thread overview]
Message-ID: <95n705$9ic1@news.cis.okstate.edu> (raw)
In-Reply-To: 95n3oi$5nh$1@news.cis.ohio-state.edu
On 5 Feb 2001 20:51:30 GMT, Mark Carroll <carroll@cis.ohio-state.edu> wrote:
>In article <95eumd$8i41@news.cis.okstate.edu>,
>David Starner <dstarner98@aasaa.ofe.org> wrote:
>
>>Ada is designed so that it is possible to garbage-collect it. It's
>>only garbage-collected on the JVM's, which don't give you any control.
>>If there was another GC implementation, any garbage-collection control
>>would be implementation-specific.
>
>That's a pity. So, there aren't any Ada compilers that compile to
>native code and offer a runtime with decent GC?
Not that I've heard of. I hacked the Boehm-Weiser GC into GNAT's runtime,
but GNAT uses some funky virtual base system that makes it crash when
running under a garbage collector. I may find the time to do it properly
(multilib it, in GCC terms), but at the very least that's going to wait
until a version of GNAT depending on the GCC 3.0 build technology comes
out.
>Are there any other
>special tricks used to make memory management easier than, say, a C
>programmer might expect?
Ada's fairly flexible about stack usage. Occasionally you'll see something
like
for I in 1 .. 50 loop
declare
A: array (0 .. I) of Integer;
begin
...
end;
end loop;
where there's a varying array. Or alternately:
type bob is array (integer range <>) of foo;
...
while (complex_condition) loop
declare
Token: bob := Something_Returning_A_Varying_String;
begin
...
end;
end loop;
where you return a varying array. It doesn't catch a lot of stuff that
really needs garbage collection, but it catches some of the places where
a C program might leak memory.
--
David Starner - dstarner98@aasaa.ofe.org
Pointless website: http://dvdeug.dhis.org
"I don't care if Bill personally has my name and reads my email and
laughs at me. In fact, I'd be rather honored." - Joseph_Greg
next prev parent reply other threads:[~2001-02-05 21:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-30 4:48 Generics - Difference between ADA and Modula--3 John Baltomoire
2001-01-30 16:04 ` Mark Carroll
2001-02-02 18:35 ` David Starner
2001-02-05 20:51 ` Mark Carroll
2001-02-05 21:46 ` David Starner [this message]
2001-02-06 0:36 ` Jeffrey Carter
2001-02-05 22:46 ` Pat Rogers
[not found] ` <95p1p7$3s9$1@nnrp1.deja.com>
[not found] ` <slrn98049v.155.lutz@taranis.iks-jena.de>
2001-02-07 13:10 ` John English
2001-02-12 20:38 ` Mark Carroll
2001-02-05 23:12 ` Mark Lundquist
2001-02-05 23:50 ` David Starner
2001-02-06 0:03 ` David Starner
[not found] <mailman.981529807.716.comp.lang.ada@ada.eu.org>
2001-02-07 14:52 ` Ted Dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox