Date: Sun, 22 Dec 1996 09:45:37 +0200 (IST) From: Eli Zaretskii 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.