home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / std / c / 3032 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.7 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!doc.ic.ac.uk!uknet!acorn!ixi!clive
  2. From: clive@x.co.uk (Clive Feather)
  3. Newsgroups: comp.std.c
  4. Subject: Re: fwrite+fread of pointer
  5. Message-ID: <1992Nov18.131809.23253@x.co.uk>
  6. Date: 18 Nov 92 13:18:09 GMT
  7. References: <1992Nov13.101813.163@nntpd.lkg.dec.com> <1992Nov15.065204.22137@sq.sq.com> <15976@goanna.cs.rmit.oz.au>
  8. Organization: IXI Limited, Cambridge, UK
  9. Lines: 24
  10.  
  11. In article <15976@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
  12. > The question can now be paraphrased:  is a pointer like a tensor, or like
  13. > the components of a tensor?  I would regard a compacting garbage collector
  14. > as simply changing the co\"ordinate system.  I have used hardware and
  15. > software systems where stacks could be moved (in order to "stretch" them)
  16. > while the owning thread was running.
  17.  
  18. An "object" is defined (ISO 3.14) as a "region of storage". I would read
  19. this as meaning that, for the lifetime of that object, a given object
  20. maps to a given region of storage. Therefore, since the address of an
  21. object is a pointer to it, the address must also be a constant. I agree
  22. that the ice is thin and an RFI would be a good idea. You might also ask
  23. whether &external_object_or_function has to be the same in all the
  24. translation units of a program.
  25.  
  26. This is all, of course, modulo the "as-if" rule. Mark Brader has shown a
  27. way to have objects move in memory whilst keeping constant addresses;
  28. this doesn't alter what I have said.
  29.  
  30. -- 
  31. Clive D.W. Feather     | IXI Limited         | If you lie to the compiler,
  32. clive@x.co.uk          | Vision Park         | it will get its revenge.
  33. Phone: +44 223 236 555 | Cambridge   CB4 4RZ |   - Henry Spencer
  34. Fax:   +44 223 236 550 | United Kingdom      |
  35.