Mail Archives: djgpp/2002/09/18/11:45:08
> We are using CWSDPMI as our DPMI server, and I have read how CWSDPMI uses
> all available XMS if there is not an external memory manager running. We are
> running HIMEM alone and have indeed seen the 0x0A return code from our XMS
> call (all available XMS memory is allocated).
I suggest you look at http://clio.rice.edu/djgpp/cwsdma2.zip
This shows how to get the physical address of a memory buffer you have
allocated using standard DJGPP services. The technique is well tested.
If you use the XMS approach, there is still the problem that when this
memory is mapped it will be mapped with caching off (since it might be
a device) which will slow access.
If you use the XMS approach, one way is to merely fragment the XMS memory
before calling your program. Allocate the block you want, allocate a 1K
block after it, lock it, then free the first block. When CWSDPMI runs
it will take the big block and leave the small block for the program
usage.
- Raw text -