From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c1b1b81e16e83802 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-02 15:35:31 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Help-memory allocation Date: 2 Jul 2003 15:35:29 -0700 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0307021435.29772aaf@posting.google.com> References: NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1057185330 8007 127.0.0.1 (2 Jul 2003 22:35:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 2 Jul 2003 22:35:30 GMT Xref: archiver1.google.com comp.lang.ada:39998 Date: 2003-07-02T22:35:30+00:00 List-Id: vashwath@rediffmail.com (prashna) wrote in message news:... > 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.)