comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: "new" word
Date: Wed, 16 Mar 2005 16:12:54 -0600
Date: 2005-03-16T16:12:54-06:00	[thread overview]
Message-ID: <lc-dnVwW6_hEM6XfRVn-gQ@megapath.net> (raw)
In-Reply-To: 1110966980.482176.111570@f14g2000cwb.googlegroups.com

"fabio de francesco" <fmdf@tiscali.it> wrote in message
news:1110966980.482176.111570@f14g2000cwb.googlegroups.com...
> Ciao,
>
> While reading "the big online book of Linux Ada programming", by Ken O.
> Burtch, I stopped at the following assertion
> (http://www.pegasoft.ca/resources/boblap/13.html):
>
> "Usually you allocate memory with the Ada new statement. Where does new
> get its memory? It uses the standard C library's malloc function."
>
> Does really Ada use Libc to implement "new"? Is it true?

"Ada" doesn't do anything. "Ada implementations" do whatever makes sense on
their target system.

On Windows, for instance, Janus/Ada uses the Windows heap manager to
allocate memory. (Presumably, malloc uses the same manager, but I don't know
that for sure.) We could write our own heap manager, but what would be the
point? The OS is already providing the services.

It does make sense on some targets to use malloc, because most
implementations want to be as compatible as possible with C (so interfacing
to C works well). But in any case it's up to the implementer. They can do
whatever makes the most sense for their target.

                  Randy.






  parent reply	other threads:[~2005-03-16 22:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-16  9:56 "new" word fabio de francesco
2005-03-16 10:30 ` Vinzent 'Gadget' Hoefler
2005-03-16 11:14   ` Adrian Knoth
2005-03-16 11:42     ` Vinzent 'Gadget' Hoefler
2005-03-16 12:09     ` Thomas Lotze
2005-03-16 13:17       ` fabio de francesco
2005-03-16 13:25         ` Vinzent 'Gadget' Hoefler
2005-03-16 13:40           ` fabio de francesco
2005-03-16 14:34             ` Vinzent 'Gadget' Hoefler
2005-03-16 13:01     ` fabio de francesco
2005-03-17 15:09       ` Lutz Donnerhacke
2005-03-16 13:49     ` Larry Kilgallen
2005-03-16 13:55     ` Florian Weimer
2005-03-17 14:38       ` Lutz Donnerhacke
2005-03-16 16:23     ` Robert A Duff
2005-03-16 11:07 ` Adrien Plisson
2005-03-16 11:36 ` Larry Kilgallen
2005-03-16 12:53   ` fabio de francesco
2005-03-16 13:10     ` Vinzent 'Gadget' Hoefler
2005-03-16 16:20 ` Robert A Duff
2005-03-18  4:10   ` Wes Groleau
2005-03-18 12:04     ` Larry Kilgallen
2005-03-18 14:05       ` Martin Krischik
2005-03-16 22:12 ` Randy Brukardt [this message]
2005-03-18  4:03 ` Wes Groleau
replies disabled

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