Mail Archives: djgpp/1996/12/22/03:06:35
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 -