HP/Rumors
Johan Vromans
jv at mhres.mh.nl
Fri Sep 9 18:23:47 AEST 1988
>From article <2921 at ttrdc.UUCP>, by levy at ttrdc.UUCP (Daniel R. Levy):
> What are the implications of this "relocation of data in memory during
> execution" and why would it cause Emacs problems but not problems in
> general with C programs which use pointers. (If the HP9000 will move a
> block of memory after a pointer to it has been loaded, then the pointer is
> now no good... or is it?)
As I remember ... an pointer on the HP9000/500 system is
something you cannot treat as an numeric quantity. Of course, you
should not do that anyway.
I recall the following symptoms:
- address space is not contiguous from zero to somewhere,
pointers contain segment numbers and offsets;
- you cannot store a pointer on disk, and read it back in
another run, because your program will probably not be loaded
in the same memory segments;
- you cannot use the highest bits of a pointer for other
purposes (as GNU Emacs does). All 32 bits contain information.
When you use pointers thru C (e.g. "ptr1 - ptr2" or "ptr[index]")
everything goes well, that's why "normal" applications are not
affected.
Another feature of the HP9000/500 is that local variables are
garanteed to contain 0 (zero) at startup.
--
Johan
More information about the Comp.lang.c
mailing list