Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!tektronix!hplabs!hpda!fortune!amd!decwrl!decvax!cca!ima!ism780b!jim From: jim@ism780b.UUCP Newsgroups: net.lang.c Subject: Re: Re: pointer -> long conversion - (nf) Message-ID: <32@ism780b.UUCP> Date: Wed, 1-Aug-84 00:24:53 EDT Article-I.D.: ism780b.32 Posted: Wed Aug 1 00:24:53 1984 Date-Received: Sat, 28-Jul-84 10:15:39 EDT Lines: 21 #R:mit-eddie:-241000:ism780b:25500015:000:1078 ism780b!jim Jul 23 11:28:00 1984 > On machines with huge virtual address spaces, it is quite reasonable to > keep addresses for the two separate. Typically, virtual stack space > could grow downward from 0xffffffff while the heap grows upward from > 0x0. On a small dedicated-application system with limited physical > memory, and in which it is certain neither the stack and heap will grow > beyond 32K, it would be quite reasonable to keep pointers inside data > structures as 16-bit *signed* quantities. In effect, one is modelling > memory as a range around zero (0xffff8000..0x00007fff) instead of the > usual notion of positive-number addressing (0x0..0x0000ffff). No, one is modelling two distinct address spaces, [0..0x7fff] and [0x8000..0xffff]; since there is no order relationship between the two, it doesn't matter whether you sign-extend or not. I would claim that, whenever there is such an order relationship, it is much simpler to base your addresses at 0 rather than at 0x8000 or 0x80000000, or whatever depending upon your adress space size. -- Jim Balter, INTERACTIVE Systems (ima!jim)