9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] segfree() - more details?
@ 2009-04-02  9:13 lucio
  2009-04-02 10:31 ` Charles Forsyth
  2009-04-02 12:50 ` cinap_lenrek
  0 siblings, 2 replies; 7+ messages in thread
From: lucio @ 2009-04-02  9:13 UTC (permalink / raw)
  To: 9fans

The rather tantalising:

          Segfree tells the system that it may free any physical mem-
          ory within the span [va, va+len), but leaves that portion of
          the process's address space valid.  The system will not free
          any memory outside that span, and may not free all or even
          any of the specified memory.  If free'd memory is later ref-
          erenced, it will be initialized as appropriate for the seg-
          ment type.  For example data and text segments will be read
          from the executable file, and bss segments will be filled
          with zero bytes.

in segattach(2) suggests that there is some mechanism to associate
disk file portions with memory segments (that being what Unix's MMAP
does, roughly), but falls short of explaining how this association is
established.  I presume there is documentation for this elsewhere that
ought to be mentioned in the above.

Also, I'm too dense to grasp the exact intent of segfree(2) as implied
in the above description, but I'm sure once I understand it I'll be
able to make use of it in my efforts to make Plan 9 understand ELF
directly.  So if anyone can point me to the right place, I'd greatly
appreciate it.

I have Nemo's "commentary" that has proved invaluable to my
understanding of the Plan 9 kernel, but I always have to find it by
inspection because its filename is not very self-explanatory.  I guess
I ought to change that, but I'm the conservative type: does anyone
remember its name?

++L




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-02 17:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <28ec308e3a4db01f0e6367ecb615903b@terzarima.net>
2009-04-02 10:27 ` [9fans] segfree() - more details? lucio
2009-04-02 11:44   ` Charles Forsyth
2009-04-02 15:48     ` ron minnich
2009-04-02 17:48       ` lucio
2009-04-02  9:13 lucio
2009-04-02 10:31 ` Charles Forsyth
2009-04-02 12:50 ` cinap_lenrek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).