Mail Archives: djgpp/1998/03/21/09:46:28
From: | Chris Wahlen <nc AT earthling DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Memory protection
|
Date: | Sat, 21 Mar 1998 03:30:05 -0600
|
Organization: | CyberNews Network
|
Lines: | 11
|
Message-ID: | <3513889C.71AAF41A@earthling.net>
|
References: | <00025A71.MAI*/G=THIERRY/I=TI/S=IMMORDINO/O=TSI/PRMD=THOMSON/ADMD=ATLAS/C=FR/@MHS>
|
Reply-To: | nc AT earthling DOT net
|
NNTP-Posting-Host: | ftworth.tx.tnt1.80.fastlane.net
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
> Hi,
>
> How can I protect, some part of the memory (variables, task stack, ..) from
> overwrites ? (mprotect perhaps )
>
mprotect() will restrict a certain memory location from being read, written, or
both. You have to specify the memory in 4k chunks. Keep in mind that it only
works under full DPMI 1.0 (i.e. Windows95 DPMI won't support it), however,
CWSDPMI does.
- Raw text -