🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5774

Re: realloc

#5774
From: Henry Spencer
Date: Wed, 29 Mar 1989 20:54
15 lines
1179 bytes
In article <10170@bloom-beacon.MIT.EDU> scs@adam.pika.mit.edu (Steve Summit) writes:
>... It is an apparently well-
>kept secret that realloc is supposed to behave gracefully at
>a slightly special-cased boundary point: when handed a NULL
>pointer and a nonzero size, it acts essentially as a malloc.

Unfortunately, this is (at present) not a portable assumption, because
neither V6 nor V7 Unix -- the Unixes from which essentially all others
are descended, and which included the first widely-known C compilers -- 
did this.  It was invented later.  There are probably a fair number
of old systems that haven't caught up with it.  (It *is* in ANSI C as
of the Oct. draft, so it will *eventually* be a portable assumption.)
-- 
Welcome to Mars!  Your         |     Henry Spencer at U of Toronto Zoology
passport and visa, comrade?    | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
Technical Details
Message-ID: <1989Mar29.205433.3958@utzoo.uucp>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <10170@bloom-beacon.MIT.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.lang.c
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: realloc
Message-ID: <1989Mar29.205433.3958@utzoo.uucp>
Organization: U of Toronto Zoology
References: <10170@bloom-beacon.MIT.EDU>
Date: Wed, 29 Mar 89 20:54:33 GMT