www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/19/23:04:08

Date: Thu, 19 Mar 1998 17:49:26 -0800 (PST)
Message-Id: <199803200149.RAA14449@adit.ap.net>
Mime-Version: 1.0
To: THIERRY DOT T DOT I DOT IMMORDINO AT TSI DOT thomson DOT fr, 44699 AT ef DOT gc DOT maricopa DOT edu
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Memory protection
Cc: djgpp AT delorie DOT com

At 12:41  3/19/1998 -0100, THIERRY DOT T DOT I DOT IMMORDINO AT TSI DOT thomson DOT fr wrote:

>How can I protect, some part of the memory (variables, task stack, ..) from 
>overwrites ? (mprotect perhaps )

`mprotect' should work (read its docs), but only if you use a sufficiently
smart DPMI server that can do it. The only ones I know of are CWSDPMI and
apparently 386MAX (Windows will *not* do it). However, the smallest unit you
can protect is a page (4096 bytes). The x86 hardware cannot handle anything
smaller than that.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019