realloc() (was: Re: Safe coding practices)

Jonathan I. Kamens jik at athena.mit.edu
Thu Jan 31 07:41:59 AEST 1991


In article <1991Jan30.201955.21797 at ux1.cso.uiuc.edu>, mcdonald at aries.scs.uiuc.edu (Doug McDonald) writes:
|> So the quote preceeded by > signs is not true for a correct realloc.
|> You CAN reuse p and *p after a failed realloc.

  We're not talking about "a correct realloc."  Remember that the book in
question is //Portability and the C Language//.  If you want to assume that
because ANSI C specifies realloc() as you quoted, all implementation of
realloc() you come across specify it in that way, that's your right, but I
doubt such an assumption is portable, which is why Jaeschke gave the
restriction he did.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.lang.c mailing list