Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Another illegal instruction awk problem



>> [...] - I think shared libraries and the like are normally mapped
>> into P0 space, which is 0x0000000 through 0x3fffffff.
> Actually, we map shared libraries in P1 just below the stack so that
> we do not need to allocate kernel memory for a bunch of unused P0
> page tables.

I don't quite get it.  You can (a) put them in high P1 space and limit
the stack; you can (b) put them in low P1 space and allocate a bunch of
KVM for unused P1 PTEs.  Or you can (c) put them in high P0 space and
allocate a bunch of KVM for unused P0 PTEs, or (d) put them in low P0
space and limit the sbrk (but not mmap) heap.  (Actually, you could in
theory put them in system space, but that isn't much of an option for
multiple reasons.)

It sounds to me as though you're saying NetBSD does (a) to avoid doing
(c).  (b) has roughly the same problems as (c), but what about (d)?
Does the sbrk heap need to have a substantially higher hard limit than
the stack for some reason?  (Does anything even use sbrk any longer?)

Presumably other mmap()ped areas get the same treatment?  mmap()
doesn't know whether what it's mapping is a dynamic library, right?

Or am I just missing something?

Hmm, I wonder how hard it would be to move a dynamic library on the
fly.  (Too hard to be worth doing, I suspect, but maybe not....)

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index