🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52349

gnu, malloc, and "zero'd" memory

#52349
From: Richard Stallman
Date: Wed, 25 Nov 1992 16:17
11 lines
1192 bytes
To ask whether GCC expects malloc to zero memory implicitly suggests
consideration of modifying malloc to do what it "expects".  That is a
completely unreasonable idea.  Clearing memory is not part of the
definition of malloc.  Programs have to accept the definition of
malloc.

It is possible for a program to have a bug where it fails to work when
malloc returns nonzero memory.  It's possible that GCC has such a bug
somewhere.  If you find a bug like this in GCC, please send a
*specific* bug report showing the code which has the problem; then the
maintainers will fix it.
Technical Details
Message-ID: <9211260217.AA26065@mole.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rms
References: <1992Nov26.013410.5755@netcom.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,459b3f6402b4c06d
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-11-25 18:27:24 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rms
From: rms@gnu.ai.mit.edu (Richard Stallman)
Subject: gnu, malloc, and "zero'd" memory
Message-ID: <9211260217.AA26065@mole.gnu.ai.mit.edu>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
References: <1992Nov26.013410.5755@netcom.com>
Distribution: gnu
Date: Wed, 25 Nov 1992 16:17:38 GMT
Lines: 11