realloc
Gordon Cross
crossgl at ingr.com
Tue Apr 4 00:46:16 AEST 1989
In article <9132 at alice.UUCP> andrew at 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 at ingr.com mine and not those
Madison, AL 35758 MA BELL: (205) 772-7842 of my employer."
More information about the Comp.lang.c
mailing list