delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/11/02:16:24

Newsgroups: comp.os.msdos.djgpp
From: malyon AT netcom DOT com (Roland Acton)
Subject: Re: Locking entire program in memory?
Message-ID: <malyonE6v85x.E54@netcom.com>
Organization: Netcom On-Line Services
References: <332163FC DOT 592C AT mail DOT connect DOT usq DOT edu DOT au> <0Tb+TRA5sdIzEwj2 AT talula DOT demon DOT co DOT uk>
Date: Tue, 11 Mar 1997 06:17:57 GMT
Lines: 18
Sender: malyon AT netcom15 DOT netcom DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) wrote:
: Somewhere in your program, add a global variable:

: #include <crt0.h>

: int _crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK | 
:                           _CRT0_FLAG_LOCK_MEMORY;

: Look in crt0.h for details about this: there are a lot of other handy
: flags that you can set in this way, to control the behaviour of the
: startup code and library routines.

  There's something I'm curious about. When I looked through crt0.h, it
mentioned that the LOCK_MEMORY flag could be turned on and off during
execution. But none of the programs I've looked through do this; they all
use the method of surrounding interrupt code with dummy functions and
locking the memory in between, which has always seemed chancy to me. CAN you
turn it on and off? Is there a reason why no one does?

- Raw text -


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