Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!ulysses!kpv From: kpv@ulysses.att.com (Phong Vo[drew]) Newsgroups: comp.lang.c Subject: Re: realloc() (was: Re: Safe coding practices) Message-ID: <14289@ulysses.att.com> Date: 9 Feb 91 20:26:07 GMT References: <00066@jimi.UUCP> <1991Feb9.032853.25461@unhd.unh.edu> Organization: AT&T Bell Laboratories, Murray Hill Lines: 14 In article <1991Feb9.032853.25461@unhd.unh.edu>, pas@unhd.unh.edu (Paul A. Sand) writes: : : Since my original posting, a number of folks have pointed out that some : older realloc()'s indeed do trash the original block on failure. My : own research (read: "a few minutes browsing at the bookstores") bears : this out. One text claims that the UNIX System V Release 4 realloc() : acts like that. (Can that be true?) : SysVr4 realloc is not old (at least in terms of publically available software) and as far as I know it does not trash space after failure. The available version may not be completely ansi-conformant with respect to realloc(NULL,size) and free(NULL) but it should otherwise work as expected. My own version is conformant and has few more bells and whistles but its public availability will take time.