Article View: net.unix-wizards
Article #1Re: brk's zero-fill behavior on VAXen
From: Roy Smith
Date: Sat, 08 Nov 1986 09:49
Date: Sat, 08 Nov 1986 09:49
21 lines
1801 bytes
1801 bytes
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!"
Technical Details
Message-ID:
<2486@phri.UUCP>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!mnetor!seismo!cmcl2!phri!royReferences:
<7208@elsie.UUCP> <5142@brl-smoke.ARPA> <2447@hcr.UUCP>Show Full Headers
Complete Article Headers
Message-ID: <2486@phri.UUCP> Subject: Re: brk's zero-fill behavior on VAXen Date: Sat, 08 Nov 1986 09:49:07 +0000 From: roy@phri.UUCP (Roy Smith) References: <7208@elsie.UUCP> <5142@brl-smoke.ARPA> <2447@hcr.UUCP> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!mnetor!seismo!cmcl2!phri!roy Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Newsgroups: net.unix-wizards Article-I.D.: phri.2486 Posted: Sat Nov 8 09:49:07 1986 Date-Received: Sun, 9-Nov-86 07:09:44 EST Reply-To: roy@phri.UUCP (Roy Smith) Organization: Public Health Research Inst. (NY, NY) Lines: 20