From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public From: David Chase Subject: [Reposted due to Enlow UCE cancel]: Re: WAS Re: Final kick at the "Merced Guessing Game" Date: 1997/10/18 Message-ID: #1/1 X-Deja-AN: 281752700 Sender: news@world.std.com (Mr Usenet Himself) References: <61cqkc$9r@news-rocq.inria.fr> <3444288C.7F4E@world.std.com> <34462D38.167E@lanl.gov> <3447D55B.1CDE@world.std.com> <62a0f5$9p8$1@lyra.csx.cam.ac.uk> X-Original-Message-ID: <3448BA41.7603@world.std.com> X-Comments: Dave the Resurrector can be contacted at dave@ferret.ocunix.on.ca X-Reposted-By: clewis@ferret.ocunix.on.ca X-Original-Path: ...!news.starnet.net!news.starnet.net!newspump.wustl.edu!crcnews.unl.edu!newsfeed.inetnebr.com!news.enteract.com!newsfeed.enteract.com!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!su-news-feed1.bbnplanet.com!news.bbnplanet.com!newsgate.tandem.com!uunet!in5.uu.net!world!news Organization: Natural Bridge LLC Reply-To: chase@world.std.com Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec Nick Maclaren wrote: > Yes, and I regard this whole mess as a tragedy of the first water. The > point is that there are TWO aspects here: > > 1) Are ALL pointer operations checked? > > 2) Is there a semi-automatic way of recovering dead space? > > The confusion that caused the Maclaren-O'Keefe explosion was due to a > misunderstanding over this. I was stating that I did not like the second > and had never seen a good one - but I was NOT stating that I did not want > the first! What I actually want is a language where all pointer uses are > checked, and I get an error when I get it wrong, but where the system > does not do unspeakable things to my data storage behind my back. The difficulty here is that without garbage collection, you may accidentally do unspeakable things to the type-correctness of your program, and the cost of checking all pointer operations goes up in an alarming way. For the case of foo * f = foo_list -> head; if you knew that foo_list had not been freed and reallocated then you could trust its static type. But, you do not know that in general. And, you need to know that the pointer stored in the head field has not been freed and reallocated as well. To determine this with certainty, since any subroutine call (or, perish the thought, thread) might free and reallocate a piece of storage, you will need to check the allocation state and type of foo_list and the allocation state and type of the pointer stored in its head field. This is still not a 100% guarantee of program sanity, since it is possible that a piece of storage was freed and reallocated as the same type; the result is type-correct in the narrowest interpretation of the word, but the any program that does this is very fragile. I implemented the runtime for something that did this for C and C++ in my previous job (C++Expert at CenterLine), and you can check most of this stuff, but you would never call it fast unless you were comparing it to other products performing a similar function. And yes, there's clever tricks you can perform to make it go faster, and we used a few of them, and it is still nowhere near as fast as unchecked C and C++. You could make it go a little faster if you used an unorthodox representation for pointers but then you'd be in your own closed little world and unable to interoperate with the operating system. Once you've decided that bounds and type-checking are not optional, garbage collection is the biggest optimization around, because you can dispense with boatloads of checking. -- David Chase, chase@world.std.com ========= WAS CANCELLED BY =======: Rogue cancel from Michael Enlow, X-Cancelled-by etc. are forged. Control: cancel <3448BA41.7603@world.std.com> Newsgroups: comp.arch Path: ...!news.hn.netlink.co.nz!canterbury.ac.nz!southpower.co.nz!nobody From: rra@eyrie.org,sw@eyrie.org,rgm@eyrie.org Subject: cmsg cancel <3448BA41.7603@world.std.com> Approved: rra@eyrie.org,sw@eyrie.org,rgm@eyrie.org Message-ID: X-No-Archive: Yes Sender: news@world.std.com (Mr Usenet Himself) X-Cancelled-By: rra@eyrie.org,sw@eyrie.org,rgm@eyrie.org Organization: Southpower Ltd Date: Sun, 19 Oct 1997 05:27:12 GMT Lines: 2 The article was canceled on 10/19/97 at 1:17:23 AM with the Usenet Cancel Engine (UCE).