Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!cmcl2!phri!roy From: roy@phri.UUCP (Roy Smith) Newsgroups: net.unix-wizards Subject: Re: brk's zero-fill behavior on VAXen Message-ID: <2486@phri.UUCP> Date: Sat, 8-Nov-86 09:49:07 EST Article-I.D.: phri.2486 Posted: Sat Nov 8 09:49:07 1986 Date-Received: Sun, 9-Nov-86 07:09:44 EST References: <7208@elsie.UUCP> <5142@brl-smoke.ARPA> <2447@hcr.UUCP> Reply-To: roy@phri.UUCP (Roy Smith) Organization: Public Health Research Inst. (NY, NY) Lines: 20 In article <2447@hcr.UUCP> mike@hcr.UUCP (Mike Tilson) writes: > I'd like to point out that there is another very good reason to > set newly allocated memory to a fixed value: buggy programs are much > less likely to exhibit non-deterministic behavior, which makes it > much easier to fix problems. As a straight-forward extension to that idea, there is a very good reason to make that fixed value 0. On most machines (I hope that doesn't create of flood of "not on my machine it isn't" postings) the value 0 is an illegal op code, often HALT. It is also often an illegal pointer, which will generate some sort of memory fault when dereferenced. The upshot is that if new memory (initialized to 0 by the system, but not initialized by your program) is used, you increase the chances of your program stopping quickly. Sort of a poor man's tagged memory. -- Roy Smith, {allegra,cmcl2,philabs}!phri!roy System Administrator, Public Health Research Institute 455 First Avenue, New York, NY 10016 "you can't spell unix without deoxyribonucleic!"