From: peuha AT cc DOT helsinki DOT fi (Esa A E Peuha) Newsgroups: comp.os.msdos.djgpp Subject: Re: MIDAS 0.6 for DJGPP beta has been released Date: 28 Feb 1997 11:37:30 GMT Organization: University of Helsinki Lines: 22 Message-ID: <5f6g1q$b05@oravannahka.Helsinki.FI> References: Reply-To: Esa DOT Peuha AT helsinki DOT fi NNTP-Posting-Host: kruuna-ether.helsinki.fi Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Petteri Kangaslampi (pekangas AT sci DOT fi) wrote: : we don't lock any of the memory we use, even though most of it gets used : in the timer interrupt. Everything seems to work OK, both under DOS : (cwsdpi) and Win95, but this still isn't good practise. Any ideas on how : to easily lock all memory used? A timer interrupt handler shouldn't be too difficult to write in assembly (which will be easy to lock) especially since you already have the equivalent C code. Just put the handler (and any other code it could call) into a separate source file, use gcc -S to compile it to assembly, add the irq-handling code (executed by wrapper for C handler), and change the handle-installing code not to allocate wrapper for the handler. Of course, you still can have a few screenfuls of memory-locking code for your data areas :-), but that's how it should be done. Meanwhile, you should advise that all programs using this timer interrupt should be compiled with the startup flag which causes all program memory be locked (the name of which I can't remember) set. -- Esa Peuha student of mathematics at the University of Helsinki http://www.helsinki.fi/~peuha/