home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / std / c / 3045 < prev    next >
Encoding:
Text File  |  1992-11-20  |  877 b   |  31 lines

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!stanford.edu!lucid.com!lucid.com!jss
  3. From: jss@lucid.com (Jerry Schwarz)
  4. Subject: malloc(0)
  5. Message-ID: <1992Nov21.005207.9741@lucid.com>
  6. Sender: usenet@lucid.com
  7. Reply-To: jss@lucid.com (Jerry Schwarz)
  8. Organization: Lucid, Inc.
  9. References: <1ejhrnINN5it@ftp.UU.NET>
  10. Date: Sat, 21 Nov 92 00:52:07 GMT
  11. Lines: 18
  12.  
  13. The standard says  (refering to allocation routines)
  14.  
  15.     If the size of the space requested is zero, the behavior
  16.     is implementation-defined; the value returned shall be
  17.     either a null pointer or a unique pointer.
  18.  
  19. I have always read "unique pointer" as meaning different from
  20. previously allocated pointers including pointers previously
  21. returned by malloc(0).  However I have just been talking to
  22. some people who insist it means that the same pointer is returned
  23. on each call of malloc(0).
  24.  
  25. Comments?
  26.  
  27.   -- Jerry Schwarz
  28.  
  29.  
  30.     
  31.