Article View: comp.sys.powerpc
Article #2302Re: Handles. Was Re: Ask yourself these before you choosing a 32bit OS...
From: Nevin ":-]" Liber
Date: Sat, 23 Sep 1995 13:30
Date: Sat, 23 Sep 1995 13:30
39 lines
2759 bytes
2759 bytes
In article <43uq94INNpbl@keats.ugrad.cs.ubc.ca>, c2a192@ugrad.cs.ubc.ca
(Kazimir Kylheku) wrote:
> Right, that's obvious, because your properly written program always takes
> care to dereference through the handle.
Yup. That pretty much comes from the definition of properly written
programs; they have to do the right thing. Those that don't, tend to
crash. They crash on Unix machines, Macs, PCs, Amigas, etc.
> I wouldn't do that at all. If a program requires that the size of an allocated
> unit change, I would have it go through a function that's similar to the
> standard C realloc().
And how would you magically fix all the references (aliases) that point to
that data structure? Or is that just another problem which you'll ignore
in your quest for elegance over practical functionality?
> I wouldn't do either of these things, needless to say. I do use the technique
> of inserting dummy pages between allocated data in order to use the hardware
> to detect instructions that would normally corrupt the heap but only for
> debugging purposes.
Actually, this is a pretty good way to implement fast double buffering
schemes, as you don't have to explicitly test every reference to see if
you are past the end of the buffer.
> I was thinking purely of a machine without an MMU
> the entire time. In fact a 68K board with about 512K RAM or even less
> was what I precisely had in mind.
But you have yet to post any solution to the problem. All you do is
assert without proof that it isn't a problem. I can show you real Mac
applications that prove this situation occurs regularly. I'll ask you
again, what do you do when there isn't enough contiguous space left in the
heap, after you've already coalaesed the blocks together when freeing
them, if you can't do compaction, besides just quitting the application?
--
Nevin ":-)" Liber nevin@CS.Arizona.EDU (520) 293-2799
Technical Details
Message-ID:
<nevin-2309950630470001@mac-nevin.cs.arizona.edu>Path:
arc1-ca.pugleaf.net!mac-nevin.cs.arizona.edu!userReferences:
<3vh2hc$9dd@falcon.ccs.uwo.ca> <MLM.95Sep20011239@monaco.cs.brown.edu> <43qddkINNpti@keats.ugrad.cs.ubc.ca> <rbarris-2109951707350001@192.168.1.16> <43uq94INNpbl@keats.ugrad.cs.ubc.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mac-nevin.cs.arizona.edu!user From: nevin@CS.Arizona.EDU (Nevin ":-]" Liber) Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel,comp.os.ms-windows.advocacy Subject: Re: Handles. Was Re: Ask yourself these before you choosing a 32bit OS... Date: Sat, 23 Sep 1995 06:30:47 -0700 Organization: University of Arizona CS Department, Tucson "It's too dang hot!" Arizona Message-ID: <nevin-2309950630470001@mac-nevin.cs.arizona.edu> References: <3vh2hc$9dd@falcon.ccs.uwo.ca> <MLM.95Sep20011239@monaco.cs.brown.edu> <43qddkINNpti@keats.ugrad.cs.ubc.ca> <rbarris-2109951707350001@192.168.1.16> <43uq94INNpbl@keats.ugrad.cs.ubc.ca> NNTP-Posting-Host: mac-nevin.cs.arizona.edu X-Newsreader: Yet Another NewsWatcher 2.0.1