Mail Archives: djgpp/1993/06/07/10:12:18
> This sounds dangerous (thinking of wild programs stabbing low mem).
Welcome to MS-DOS.
> Wouldn't it be better to unmap this region, and provide functions to
> map it only if the program asked for it via an system call? Maybe the
> safety intrinisic in hiding a 1 meg space in 4 gig is adequate. An
> incrementing pointer won't run into e0000000, because it will fault
> first. Let's see, a randomly generated pointer has a 1 in 4096 chance
> of hitting the mapped low memory.
Unfortunately, the stuff that's dangerous to hit is also the stuff
most commonly needed, and a lot of code already expects it. With the
DPMI-needed calls, the mapping is actually in a different segment, so
a runaway pointer cannot possibly hit it. Eventually, the mapping
will have to go away completely if DPMI 1.0 doesn't become common.
- Raw text -