🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #6952

realloc() - standard unix opperation is what?

#6952
From: anthony howe
Date: Thu, 14 Dec 1989 02:16
22 lines
1383 bytes
I'm making use of realloc() from the Dale's dlibs. However I wonder
how close this function is to a standard unix site. In Dale's version
if <addr> is NULL then a malloc is done. If <size> is zero then a
free is done. Else resized and possibly moved block of memory.
NULL may be returned is the block can not be resized.

Now the man page for realloc() here at U(W) does not say anything
except that the block is resized and possibly moved and that NULL
may be returned if the resize fails.

What is the standard action realloc should take on when passed a
NULL address or a size of zero?

In particular the issue of size zero. Does a unix realloc() free
or size down to zero?

- ant
  achowe@tiger.waterloo.edu     | "It is hard to make the world go away
   _     -|-|_   _              |  when it has decided to notice you." 
  (_\ |\| | | | (_) |\| \/      |  - Spock's World
                     ___/       |                        disclaimer...
Technical Details
Message-ID: <19281@watdragon.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!watserv1!watdragon!tiger!achowe

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!watserv1!watdragon!tiger!achowe
From: achowe@tiger.waterloo.edu (anthony howe)
Newsgroups: comp.sys.atari.st
Subject: realloc() - standard unix opperation is what?
Message-ID: <19281@watdragon.waterloo.edu>
Date: 14 Dec 89 02:16:40 GMT
Sender: daemon@watdragon.waterloo.edu
Reply-To: achowe@tiger.waterloo.edu (anthony howe)
Organization: U. of Waterloo, Ontario
Lines: 22