From mboxrd@z Thu Jan 1 00:00:00 1970 From: grog@lemis.com (Greg 'groggy' Lehey) Date: Mon, 14 Sep 2015 13:20:45 +1000 Subject: [TUHS] Did realloc ever zero the new memory? In-Reply-To: References: <201509130032.t8D0WvPl024634@tahoe.cs.Dartmouth.EDU> <20150913011501.GF2103@mcvoy.com> Message-ID: <20150914032045.GM3796@eureka.lemis.com> On Sunday, 13 September 2015 at 16:09:55 +1000, Dave Horsfall wrote: > On Sat, 12 Sep 2015, Larry McVoy wrote: > >> That's a really good point. Anyone like these? >> >> void *alloc(size_t bytes); >> void *realloc(void *old, size_t want); >> >> void *zalloc(size_t bytes); >> void *zealloc(void *old, size_t want); >> >> So alloc is new, we can have that. Realloc() is OK? Or not? Does the >> current one have weird semantics? >> >> zalloc/zealloc are new, we can have those. >> >> If you guys like these I can push on Linus and the glibc people. > > I'll vote for those, although my dev days are pretty much over. I've > never liked malloc() etc not clearing memory, although it has been, ahem, > useful, in the past... http://xkcd.com/927/ Greg -- Sent from my desktop computer. Finger grog at FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: