From: pekangas AT sci DOT fi (Petteri Kangaslampi) Newsgroups: comp.os.msdos.djgpp Subject: Re: MIDAS 0.6 for DJGPP beta has been released Date: 28 Feb 1997 15:49:17 GMT Organization: Scifi Communications International Oy, http://www.sci.fi/, helpdesk AT sci DOT fi, 03 2899111 Lines: 33 Message-ID: References: <5f6g1q$b05 AT oravannahka DOT Helsinki DOT FI> Reply-To: pekangas AT sci DOT fi NNTP-Posting-Host: sci.fi To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On 28 Feb 1997 11:37:30 GMT, Esa A E Peuha wrote: >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 >[...] Yes, but the problem is that practically all code in MIDAS can get called inside the interrupt, as all music playing is done there. That's why I have been looking for a good way to determine the whole memory area used by the library, and lock it as a one big chunk. So far the best idea I have had is to add two dummy modules with labels in all segments (code, data, BSS), add them as first and last modules, and use them to determine the memory to lock. The problem is, this depends on how the linker orders the modules, and doesn't sound too reliable because of that. Meanwhile, MIDAS seems to work very reliably without locking, I haven't had a single crash related to that myself, and neither have I heard of anyone else. The problems probably start when cwsdpmi starts swapping to disk. BTW, everybody, if the timer borders get too annoying, mail me for instructions on how to remove them :) The next MIDAS release will probably be the MIDAS Juhla Version, out Friday the 7th, with quite a few updates and fixes. DOS only. Petteri