Mail Archives: djgpp-workers/1997/06/25/03:36:28
Charles Sandmann wrote:
> Nope, been there, done it. Use sys\mman.h - use PROT_NONE for the boundary
> limit pages (4096 byte boundaries) and use PROT_READ for structures you
> don't want modified.
Does mprotect() get 'any' address ? Or does it need that the passed
address is aligned on a page start ? What happens if it's not aligned ?
> Of course, you need CWSDPMI or 386MAX for this, and a hacked malloc package. You can use about 1/2 Gb
> of address space with CWSDPMI before the page tables start to fault.
Well, it's documented that it needs some DPMI 1.0 extensions on 0.9
memory blocks. 1/2 GB should be enough, since CWSDPMI can handle 'only'
a maximum of 256MB :-)
> You may find some unix code will work out of the box with this call :-)
Really a good thing :-)
Tks.
- Raw text -