home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / std / c / 3052 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  1.0 KB

  1. Path: sparky!uunet!sdrc!thor!scjones
  2. From: scjones@thor.sdrc.com (Larry Jones)
  3. Newsgroups: comp.std.c
  4. Subject: Re: malloc(0)
  5. Message-ID: <2305@sdrc.COM>
  6. Date: 22 Nov 92 16:54:09 GMT
  7. References: <1ejhrnINN5it@ftp.UU.NET> <1992Nov21.005207.9741@lucid.com>
  8. Sender: news@sdrc.COM
  9. Lines: 17
  10.  
  11. In article <1992Nov21.005207.9741@lucid.com>, jss@lucid.com (Jerry Schwarz) writes:
  12. < The standard says  (refering to allocation routines)
  13. <     If the size of the space requested is zero, the behavior
  14. <     is implementation-defined; the value returned shall be
  15. <     either a null pointer or a unique pointer.
  16. < I have always read "unique pointer" as meaning different from
  17. < previously allocated pointers including pointers previously
  18. < returned by malloc(0).
  19.  
  20. That was indeed the committee's intent.  If every call for zero space
  21. returned the same pointer it wouldn't be very unique, would it?
  22. ----
  23. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  24. larry.jones@sdrc.com  or  ...uunet!sdrc!larry.jones
  25. It's no fun to play games with a poor sport. -- Calvin
  26.