🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2964

Re: fwrite+fread of pointer

#2964
From: Clive Feather
Date: Wed, 18 Nov 1992 13:18
24 lines
1809 bytes
In article <15976@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
> The question can now be paraphrased:  is a pointer like a tensor, or like
> the components of a tensor?  I would regard a compacting garbage collector
> as simply changing the co\"ordinate system.  I have used hardware and
> software systems where stacks could be moved (in order to "stretch" them)
> while the owning thread was running.
 
An "object" is defined (ISO 3.14) as a "region of storage". I would read
this as meaning that, for the lifetime of that object, a given object
maps to a given region of storage. Therefore, since the address of an
object is a pointer to it, the address must also be a constant. I agree
that the ice is thin and an RFI would be a good idea. You might also ask
whether &external_object_or_function has to be the same in all the
translation units of a program.

This is all, of course, modulo the "as-if" rule. Mark Brader has shown a
way to have objects move in memory whilst keeping constant addresses;
this doesn't alter what I have said.

-- 
Clive D.W. Feather     | IXI Limited         | If you lie to the compiler,
clive@x.co.uk          | Vision Park         | it will get its revenge.
Phone: +44 223 236 555 | Cambridge   CB4 4RZ |   - Henry Spencer
Fax:   +44 223 236 550 | United Kingdom      |
Technical Details
Message-ID: <1992Nov18.131809.23253@x.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!doc.ic.ac.uk!uknet!acorn!ixi!clive
References: <1992Nov13.101813.163@nntpd.lkg.dec.com> <1992Nov15.065204.22137@sq.sq.com> <15976@goanna.cs.rmit.oz.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!doc.ic.ac.uk!uknet!acorn!ixi!clive
From: clive@x.co.uk (Clive Feather)
Newsgroups: comp.std.c
Subject: Re: fwrite+fread of pointer
Message-ID: <1992Nov18.131809.23253@x.co.uk>
Date: 18 Nov 92 13:18:09 GMT
References: <1992Nov13.101813.163@nntpd.lkg.dec.com> <1992Nov15.065204.22137@sq.sq.com> <15976@goanna.cs.rmit.oz.au>
Organization: IXI Limited, Cambridge, UK
Lines: 24