Article View: comp.std.c
Article #2975malloc(0)
From: Jerry Schwarz
Date: Sat, 21 Nov 1992 00:52
Date: Sat, 21 Nov 1992 00:52
18 lines
907 bytes
907 bytes
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
Technical Details
Message-ID:
<1992Nov21.005207.9741@lucid.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!lucid.com!lucid.com!jssReferences:
<1ejhrnINN5it@ftp.UU.NET>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!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