home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c
- Path: sparky!uunet!stanford.edu!lucid.com!lucid.com!jss
- From: jss@lucid.com (Jerry Schwarz)
- Subject: malloc(0)
- Message-ID: <1992Nov21.005207.9741@lucid.com>
- Sender: usenet@lucid.com
- Reply-To: jss@lucid.com (Jerry Schwarz)
- Organization: Lucid, Inc.
- References: <1ejhrnINN5it@ftp.UU.NET>
- Date: Sat, 21 Nov 92 00:52:07 GMT
- Lines: 18
-
- The standard says (refering to allocation routines)
-
- If the size of the space requested is zero, the behavior
- is implementation-defined; the value returned shall be
- either a null pointer or a unique pointer.
-
- I have always read "unique pointer" as meaning different from
- previously allocated pointers including pointers previously
- returned by malloc(0). However I have just been talking to
- some people who insist it means that the same pointer is returned
- on each call of malloc(0).
-
- Comments?
-
- -- Jerry Schwarz
-
-
-
-