Article View: comp.sys.powerpc
Article #2304Re: Handles. Was Re: Ask yourself these before you choosing a 32bit OS...
From: Jerry Shekhel
Date: Sat, 23 Sep 1995 15:48
Date: Sat, 23 Sep 1995 15:48
39 lines
2404 bytes
2404 bytes
Kazimir Kylheku (c2a192@ugrad.cs.ubc.ca) wrote: : > : >I can think of a way to do that without actual double indirection, but it : >chews up an awful lot of address space and requires an MMU. Perhaps you : >could suggest a better way? You are given a Motorola 68000 motherboard and : >512K of RAM. Go. : : 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(). : Yes, and the standard C realloc() may move the object, invalidating any pointer that references it. : : There is another way; it's called a segmented-paged MMU like the 386. : When you allocate an object, you can reference it through a segment:offset : address. If you need to move the object, you just move it somewhere else : in the virtual address space, and change the base address stored in the : segment descriptor table. : This isn't really "another way", it's good old double indirection again, although with hardware support: segment:offset --> linear virtual --> linear physical : : Mind you, the lame 386 implementation gives : you a very narrow limit on how many segment descriptors you can have... : Right. You can't really use separate segments for storing every single one of your objects. By the way, do you know of an architecture that has both hardware segments and paging, and does not have the x86 limitations? -- Jerry J. Shekhel jerry@cybercom.net
Technical Details
Message-ID:
<441a7m$j6j@orion.cybercom.net>Path:
arc1-ca.pugleaf.net!kalypso.cybercom.net!jerryReferences:
<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!kalypso.cybercom.net!jerry From: jerry@cybercom.net (Jerry Shekhel) 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... Followup-To: 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 Date: 23 Sep 1995 15:48:05 GMT Organization: Cyber Access Internet Communications, Inc. Message-ID: <441a7m$j6j@orion.cybercom.net> 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: kalypso.cybercom.net X-Newsreader: TIN [version 1.2 PL2]