Xref: utzoo comp.std.c:1004 comp.lang.c:17396 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!ingr!crossgl From: crossgl@ingr.com (Gordon Cross) Newsgroups: comp.std.c,comp.lang.c Subject: Re: realloc Message-ID: <4801@ingr.com> Date: 3 Apr 89 14:46:16 GMT References: <10170@bloom-beacon.MIT.EDU> <10032@ihlpb.ATT.COM> <934@atanasoff.cs.iastate.edu> <9132@alice.UUCP> Reply-To: crossgl@ingr.UUCP (Gordon Cross) Organization: Intergraph Corp. Huntsville, AL Lines: 17 In article <9132@alice.UUCP> andrew@alice.UUCP (Andrew Hume) writes: > > malloc(n) returning 0 is, to me, an error condition. that is, >i should pack up and go home. (of course i check malloc's return value). >But now, thanks to pANS, i first have to check if n==0. this is a pain >in the butt. Yes, it is. I've always wanted behavior similiar to an "out-of-memory" signal that I could trap to let me know when there is no more memory. So much so in fact, I wrote my own malloc that lets me set things up to have a function called whenever an out-of-memory condition occurs. Regrettably to the best of my knowlegde, the pANS does not address this issue... -- Gordon Cross UUCP: uunet!ingr!crossgl "all opinions are 111 Westminister Way INTERNET: crossgl@ingr.com mine and not those Madison, AL 35758 MA BELL: (205) 772-7842 of my employer."