Mail Archives: djgpp/1998/10/07/05:12:51
On Tue, 6 Oct 1998, Jari Tuominen wrote:
> I have been wondering about CWSDPMI memory management,
> why it won't allow using of Linear Address 0?
Because accessing a null pointer is a very common programmatic error.
ANSI C assures that no real address is zero, so any program that uses
such addresses has a bug.
> Windows DPMI allows it !
Somebody already pointed out that Windows itself has so many bugs that it
probably won't be able to run without letting null pointers live and
thrive.
> Is there any ways to solve this annoying bug?
This is not a bug, it's a feature, and a great help to locating bugs in
your programs. Why would you need to remove it? Do you like your code
to use uninitialized pointers that peek up garbled values?
If you really need that, you could remove the part of the startup code
which calls the DPMI function to protect the null page. It's in crt0.s
inside djlsr201.zip.
- Raw text -