Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.unix.questions Subject: Re: sbrk(2) question Message-ID: <4296@skye.ed.ac.uk> Date: 11 Mar 91 13:44:04 GMT References: <1991Mar8.180132.12025@Think.COM> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 16 In article <1991Mar8.180132.12025@Think.COM> barmar@think.com (Barry Margolin) writes: >This question came up at work yesterday: when sbrk(2) is used to increase >the size of the data segment, is the newly-allocated memory guaranteed to >be empty? There's one case where it amlost certainly won't be zero, which is when memory has been previously alocated and released (eg by calling sbrk() with a negative argument). So it's unwise to rely on it even if the operating system allocates zeroed (or zero-fill-when-referenced) pages. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin