comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@on2.com (Matthew Heaney)
Subject: Re: Help-memory allocation
Date: 2 Jul 2003 15:35:29 -0700
Date: 2003-07-02T22:35:30+00:00	[thread overview]
Message-ID: <1ec946d1.0307021435.29772aaf@posting.google.com> (raw)
In-Reply-To: d40d7104.0306300111.204fc99e@posting.google.com

vashwath@rediffmail.com (prashna) wrote in message news:<d40d7104.0306300111.204fc99e@posting.google.com>...
> How to check whether the memory is allocated or not when using new
> operator?in other words, what the operator "new" returns if memory
> allocation fails?

The exception Storage_Error is raised if the allocation fails.

> Surprisingly no tutorial or book mentions what it
> returns or is that this "new"(Ada) is entirely different from C++
> "new" or C's malloc.

No book mentions that Ada's allocator new is different from the C++
allocator new because they aren't different!  They behave identically,
in the sense that both raise an exception.  (The C++ exception is
named std::bad_alloc.)



      parent reply	other threads:[~2003-07-02 22:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-30  9:11 Help-memory allocation prashna
2003-06-30  9:14 ` Vinzent Hoefler
2003-06-30 10:30   ` Rodrigo Garcia
2003-06-30 14:56   ` Florian Weimer
2003-06-30 15:25     ` Vinzent Hoefler
2003-06-30 16:56       ` 
2003-07-01  9:15         ` Florian Weimer
2003-07-01  8:58       ` Florian Weimer
2003-07-03  6:53         ` prashna
2003-07-03  7:24       ` Robert I. Eachus
2003-07-01  9:06     ` prashna
2003-07-01  9:17       ` Florian Weimer
2003-07-01 12:21         ` 
2003-07-02 15:59 ` Richard Riehle
2003-07-02 22:35 ` Matthew Heaney [this message]
replies disabled

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