comp.lang.ada
 help / color / mirror / Atom feed
From: Adrien Plisson <aplisson-news@stochastique.net>
Subject: Re: "new" word
Date: Wed, 16 Mar 2005 12:07:49 +0100
Date: 2005-03-16T12:07:49+01:00	[thread overview]
Message-ID: <42381385$0$10342$ba620e4c@news.skynet.be> (raw)
In-Reply-To: <1110966980.482176.111570@f14g2000cwb.googlegroups.com>

fabio de francesco wrote:
> 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."

it does not seem entirely true...

if i understand the ARM correctly (ARM95 - 13.11 Storage Management), 
the new statement gets its memory from a storage pool. if you don't 
define your own storage pool for an access type, the implementation 
will provide a default standard storage pool.

so it should be the standard storage pool which uses the standard C 
library's malloc function.

> Does really Ada use Libc to implement "new"? Is it true?
> 
> It seems absurd to me. I don't understand why Ada should depend on a C
> standard library. 

not totally absurd. Linux has been developped in C, so system 
interfaces are provided in C. be it the standard C library or the 
system programming interface, your Ada runtime would have used C anyway.

also note that it is this particular implementation of Ada which does 
that. the ARM does NOT define anything in term of the C standard 
library, so each implementation uses what fit best.

-- 
rien



  parent reply	other threads:[~2005-03-16 11:07 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 [this message]
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
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