Mail Archives: djgpp/1996/07/10/02:16:29
Xref: | news2.mv.net comp.os.msdos.djgpp:5802
|
From: | jrubin AT bix DOT com (jrubin)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Catch protection violations?
|
Date: | 10 Jul 1996 04:16:24 GMT
|
Organization: | BIX
|
Lines: | 16
|
Message-ID: | <4rvaqo$a9@news2.delphi.com>
|
NNTP-Posting-Host: | bix.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
In djgpp V2., is it possible to write a handler for protection violations?
My application is a Scheme compiler. It would be nice to encode an
object's type in the high bits of the address. For example, a pointer to
a cons cell would be represented as 2^26 + <true address>. When only that
type is legal, the generated code would do:
movl %eax-2^24, %ebx ; fault if type is not cons
Second question: Is there any control over page protection? Can I
load data at runtime, then set those pages to read-only? This would
be done to simplify debugging.
Third, a question about paging:
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!
- Raw text -