| delorie.com/archives/browse.cgi | search |
| Date: | Mon, 2 Jul 2001 21:06:00 -0400 |
| Message-Id: | <200107030106.VAA05723@envy.delorie.com> |
| X-Authentication-Warning: | envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f |
| From: | DJ Delorie <dj AT delorie DOT com> |
| To: | djgpp AT delorie DOT com |
| In-reply-to: | <T7807.80082$Mf5.22355219@news3.rdc1.on.home.com> |
| (tomstdenis AT yahoo DOT com) | |
| Subject: | Re: malloc() problem, DJDEV 203 |
| References: | <Pine DOT SOL DOT 4 DOT 33 DOT 0107022250120 DOT 27631-100000 AT holyrood DOT ed DOT ac DOT uk> <200107022219 DOT SAA04299 AT envy DOT delorie DOT com> <Pine DOT SOL DOT 4 DOT 33 DOT 0107030043180 DOT 14632-100000 AT holyrood DOT ed DOT ac DOT uk> <200107022351 DOT TAA05124 AT envy DOT delorie DOT com> <T7807.80082$Mf5 DOT 22355219 AT news3 DOT rdc1 DOT on DOT home DOT com> |
| Reply-To: | djgpp AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
> > No, there are far too many programs that expect malloc(0) to succeed, > > even if the standard allows it to fail. > > While I agree that seems practical it isn't "a good thing". Why? The standard allows it to fail, but it also allows it to succeed. Why shouldn't we return a usable pointer to a zero-length (well, 8 byte length) buffer? I'd rather djgpp not be on the list of systems that gratuitously cause problems for the user, when it's just as easy to do something useful instead.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |