home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sdrc!thor!scjones
- From: scjones@thor.sdrc.com (Larry Jones)
- Newsgroups: comp.std.c
- Subject: Re: malloc(0)
- Message-ID: <2305@sdrc.COM>
- Date: 22 Nov 92 16:54:09 GMT
- References: <1ejhrnINN5it@ftp.UU.NET> <1992Nov21.005207.9741@lucid.com>
- Sender: news@sdrc.COM
- Lines: 17
-
- In article <1992Nov21.005207.9741@lucid.com>, jss@lucid.com (Jerry Schwarz) writes:
- < 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).
-
- That was indeed the committee's intent. If every call for zero space
- returned the same pointer it wouldn't be very unique, would it?
- ----
- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070
- larry.jones@sdrc.com or ...uunet!sdrc!larry.jones
- It's no fun to play games with a poor sport. -- Calvin
-