Re: More benchmark bullshit, and Linux luser mating calls... (was Re: Linux betas NT in TPC testing, running Oracle8

From: Christopher B. Browne <cbbrowne_at_news.brownes.org>
Date: Sat, 01 May 1999 15:55:03 GMT
Message-Id: <slrn7im88q.135.cbbrowne_at_godel.brownes.org>


On Sat, 01 May 1999 15:20:35 GMT, Anthony Ord <nws_at_rollingthunder.demon.co.uk> posted:
>If you free no 714 then try to access it with a pointer you
>should get a SEGV (sometimes).

No, if you're using an array to implement a linked list, then if you "free" entry #714, then you aren't changing the array, but rather something in a separate data structure independent of the array.

In effect, you *can't* free #714; that's a position in a fixed array that you defined. You can't get rid of #714 without getting rid of everything from #714 to the end of the array.

There may be need to worry aboug SEGV when looking at whatever the contents of #714 pointed to, although if that too is in an array, not necessarily so.

The point here is that if you're using arrays, the array management code can probably find out-of-bound situations *MORE* successfully and accurately than can the memory manager. There's no need for SEGV unless the array manager decides to fail. Or if you're working with a language like C, where arrays are somewhat simulated objects, and there's no "array manager."

In my FORTH days, I used both array schemes that included bounds checkers, and array schemes that didn't. If there's no bounds checker, then you run the risk of SEGV. If there is, then there's no such risk.

-- 
Those who do not understand Unix are condemned to reinvent it, poorly. 	
-- Henry Spencer          <http://www.hex.net/~cbbrowne/lsf.html>
cbbrowne_at_hex.net - "What have you contributed to free software today?..."
Received on Sat May 01 1999 - 17:55:03 CEST

Original text of this message