Mail Archives: djgpp/1996/07/10/22:31:11
> In djgpp V2., is it possible to write a handler for protection violations?
Yes, see signal() docs. If you want more machine info, you can look at
__djgpp_exception_state.
> movl %eax-2^24, %ebx ; fault if type is not cons
Should work OK.
> Second question: Is there any control over page protection?
Sure, see mprotect(). Must be aligned on 4K pages, so pad and align.
But this only will work under a DPMI 1.0 extension provider, like
CWSDPMI. Ignored for other providers.
> Can I load data at runtime, then set those pages to read-only?
Sure. Same routine as above. Rarely used, beware of bugs. Same
limitations.
> Does Djgpp remember the origin of read-only pages? Since they came from
> the executable image file, they don't need to be allocated any
> 'backing store' in the page file. They don't need to be written out!
Sorry, doesn't work that way in V2. There aren't any read-only pages
by default (since most dpmi's don't support them). Humm, actually,
I don't think anyone has probably tried paging readonly pages. For all
I know, CWSDPMI will puke if you try it. Never tested it, don't remember
if I designed for it either...
- Raw text -