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-06-30 07:56:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.uni-stuttgart.de!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Help-memory allocation Date: Mon, 30 Jun 2003 16:56:16 +0200 Message-ID: <87y8zjvckv.fsf@deneb.enyo.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1056984976 15390 212.9.189.171 (30 Jun 2003 14:56:16 GMT) X-Complaints-To: Cancel-Lock: sha1:8rxt+0je4ajUXntpHjMI89qMQbE= Xref: archiver1.google.com comp.lang.ada:39930 Date: 2003-06-30T16:56:16+02:00 List-Id: Vinzent Hoefler writes: >>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? > > I'd say, it raises the Storage_Error exception. In conforming implementations, yes. However, many Ada implementations will only raise Storage_Error at some later point in the execution of the program ("commit on allocate" vs. "commit on use").