Mail Archives: djgpp/1999/08/06/01:53:34
Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote:
: On 25 Jul 1999, Martin Str|mberg wrote:
: > Welllll... If the pages is unmapped shouldn't the DPMI server realise
: > that a pointer that is outside the allocated amount of memory should
: > result in SIGSEGV?
:
: I think you are confusing ``unmapped'' with ``paged in''. A page
: whose address is inside the segment limits is ``mapped'', but not
: ``paged in'' until you touch some address inside that page. When you
: do touch that address, a page fault indeed happens, but it is handled
: by the DPMI host which brings the page into memory and returns to the
: client. If this were not how it works, you would have been hit by a
: SIGSEGV each time you accessed another 4KB part of a large malloc'ed
: block.
No I don't think I do. Physically it would be mapped in but as the
DPMI server hasn't given it to a client to use it's logically
unmapped. So the server has to decide when page fault happens, if it's
logically unmapped, to deliver a SIGSEGV; or if it _is_ mapped, swap
in the page and let the client continue.
In one sentence, the DPMI server will use page faults to generate
SIGSEGVs.
Shostakovich, String Quartet 14,
MartinS
- Raw text -