Mail Archives: djgpp/1996/07/16/10:30:46
> you could just enable near pointers, do your stuff and then disable them.
> However, this is slow, because __djgpp_nearptr.. functions issue DPMI calls
The expectation was that you would not call these routines so many times as
to hurt the performance in production code. Once the code is debugged,
turn off the extra calls.
> etc. I found a cool workaround for that:
> [1] Allocate an alias to your data descriptor and set its limit to 4GB.
> [2] When you need near pointers, load ds and es with the alias.
> [3] When done reload ds and es with the original selector.
This is a very nice setup. Beware that sbrk() messes with limits, so if
you call malloc() or any routine that does, you might not get exactly
what you expect.
- Raw text -