delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/26/19:16:18

Date: Thu, 26 Dec 1996 18:51:57 -0500 (EST)
From: Michael Phelps <morphine AT hops DOT cs DOT jhu DOT edu>
To: Gene Buckle <geneb AT web DOT wa DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Need "fancy" trick...
In-Reply-To: <Pine.LNX.3.93.961226144409.8523A-100000@web.wa.net>
Message-ID: <Pine.GSO.3.95.961226183216.3119B-100000@hops.cs.jhu.edu>
MIME-Version: 1.0

On Thu, 26 Dec 1996, Gene Buckle wrote:

> > > Eli, my understanding of system() and the spawn() functions leads me to 
> > > belive that the program that issues those calls could be swapped out of 
> > > memory.  This would be VERY bad.
> > 
> > Your interrupt handler needs to be in locked memory, then it will never 
> > be swapped.  This has nothing to do with the way you call the child 
> > programs.  DJGPP has a library function to lock regions of memory (see 
> > the docs of `__dpmi_lock_linear_region' in the libc reference).
> > 
> 
> Is it possible to use this method to lock the *entire* program?
> 
> g.
> 
> 
Yes, but there is an easier method for the entire program.  Try:
	#include <crt0.h>
	...
	int	main()
	{
		_crt0_startup_flags = _CRT0_FLAG_LOCK_MEMORY;
		...
		return 0;
	}



						---Michael Phelps
						   morphine AT cs DOT jhu DOT edu


                               CH3
                               |
                               N
                             / |
                     ______/   |
                    /      \   CH2
             _____/         \__|__      
           //     \\        /  |  \\     
         //        \\______/___CH2 \\  
          \        /       \       /
           \______/         \_____/
          / ------ \       /      \
        OH           \   /         OH
                       O
 
                   Morphine



- Raw text -


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