www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/22/03:06:35

Date: Sun, 22 Dec 1996 09:45:37 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: hotpulp AT netidea DOT com
cc: djgpp AT delorie DOT com
Subject: Re: DPMI Question
In-Reply-To: <59csbg$58k@nr1.ottawa.istar.net>
Message-ID: <Pine.SUN.3.91.961222094327.29376Q-100000@is>
MIME-Version: 1.0

On 20 Dec 1996 hotpulp AT netidea DOT com wrote:

> > > What does this DPMI_lock_memory - Function do,I found in some
> > > sample-programs ??
> > 
> > It causes the specified region of memory to never be swapped out of
> > memory by the virtual memory mechanism.
> 
> When would I want to lock data or code? Just when I need to rely on
> something always being there?

You need to lock code and data used by hardware and some software 
interrupt handlers.  Otherwise, your program would crash, if the 
interrupt hits in a middle of a DOS call, because the virtual memory uses 
DOS to read the swap file, and DOS is non-reentrant.

> could I lock the video buffer?

What for?  The video RAM is always present.

- Raw text -


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