www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/12/18/13:08:58

From: sandmann AT clio DOT rice DOT edu (Charles W. Sandmann)
Subject: Re: Interrupt routines in 1.11
To: mjo AT mrao DOT cam DOT ac DOT uk (Martin Oldfield)
Date: Sat, 18 Dec 1993 11:12:40 -0600 (CST)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP Mailing List)

> This is consistent with the observed behavoir. OK, so who's
> responsible for paging stuff around ? Is it all internal to go32 ?
> Are there plans to provide page locking routines or are you looking
> for some mug to offer ? (If so, where do I start looking ?)
> 
> On a more general level, what kind of algorithms are used for page
> control ? Given that our application uses significantly less memory
> than the physical memory available, is there anyway to ensure that
> go32 doesn't throw away a page after loading it ?

If you are running under DPMI, then DPMI handles the paging.  If you
are running outside DPMI, then GO32 handles the paging.  DPMI provides
page locking routines, but GO32 does not have any such features.
If you have more memory than the program will use, touching it once (and
not calling system() or spawn()) should keep the routine in memory.  This
is not guaranteed under something like windows, however, so under real DPMI
you should call the page locking services.  The go32.h has the structure
with the flag that you can tell if you are in DPMI mode or not.  Note, that
in V2.0 all programs will appear to run under DPMI, so it's a good idea to
get familiar with the DPMI calls now.

The problem is that DOS is not reentrant - so you can't call it from a
hardware interrupt to page in memory from disk.

- Raw text -


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