Article View: comp.sys.intel
Article #1521segments and Unix
From: Phil Ngai
Date: Tue, 18 Nov 1986 19:44
Date: Tue, 18 Nov 1986 19:44
22 lines
1524 bytes
1524 bytes
I'd like to propose something here. Have you ever spent a few days
tracking down a bug caused by writing beyond the bounds of an array
and trashing a vital data structure which only gets noticed many
cycles later? Strings, of course, are arrays.
Suppose every data structure were in its own segment. And of course,
that every segment were big enough to hold any data structure you
needed so that you didn't need to manage multiple segments for one
data structure. Then when a bug trys to access beyond the end of an
array, the bad reference is trapped at the time of dereference instead
of invisibly (at the time) trashing an innocent data structure that
happened to be in the right (wrong) place.
Would this be worth doing? Of course, it would complicate the OS's
memory management duties. But think about it.
--
The distance from the North end of Vietnam to the South end is about
the same as the distance from New York to Florida.
Phil Ngai +1 408 749 5720
UUCP: {ucbvax,decwrl,hplabs,allegra}!amdcad!phil
ARPA: amdcad!phil@decwrl.dec.com
Technical Details
Message-ID:
<13802@amdcad.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-spam!ames!amdahl!amdcad!philShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!sri-spam!ames!amdahl!amdcad!phil From: phil@amdcad.UUCP (Phil Ngai) Newsgroups: comp.sys.intel,comp.lang.c Subject: segments and Unix Message-ID: <13802@amdcad.UUCP> Date: Tue, 18-Nov-86 14:44:48 EST Article-I.D.: amdcad.13802 Posted: Tue Nov 18 14:44:48 1986 Date-Received: Tue, 18-Nov-86 21:44:01 EST Organization: AMDCAD, Sunnyvale, CA Lines: 22