This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: precompiled header support


> -----Original Message-----
> From: geoffk On Behalf Of Geoff Keating
> Sent: 07 May 2004 19:45

> "Dave Korn" <> writes:
> 
> >   Which led me to the following thought: can't the gc be 
> (ab)used to chase
> > down all the pointers in the mmap'd area and convert them 
> to a self-relative
> > form?
> 
> Something with the same effect can be done, yes.  However, no-one has
> yet implemented this because it would be slower and there's never been
> an example of a host which really needed it.  (Maybe if you can
> explain more about your host, it might be the first example.)
> 
> -- 
> - Geoffrey Keating <>

  Really, I'm just having a hard time unlearning everything I've learnt in
the past fifteen years about object serialization techniques and how you
should never ever write a pointer to a disk file and how it's a mortal sin
to make assumptions about how the memory will be layed out in a dynamic
system...  It's a whole scary new world for me.  I didn't actually have a
specific host in mind; it was a theoretical question.  The gc and pch are
relatively new gcc features in my experience which I haven't worked with
before and as I'm learning about them it was just an obvious thing to wonder
about.

  Mind you, I worry that this kind of reasoning may harbour unstated
all-the-worlds-a-*nix assumptions.  Gunther mentions the Amiga/68k; I can't
think of any other host platforms off the top of my head, but it's a good
example: it's a non memory-protected OS, where all apps share the same
memory space (yeh; a bit out-of-date, I know, but it imposes a bit of
discipline on your resource allocation and deallocation coding techniques
when you know you have to free every malloc because it won't get released
just because your process exits!).  As the earlier thread mentioned, factors
like exec-shield that randomize the process' layout also interfere.  Oh, and
does djgpp implement mmap using dpmi?



    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....
 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]