Mail Archives: djgpp/1997/02/28/14:39:03
On 28 Feb 1997 11:37:30 GMT, Esa A E Peuha <peuha AT cc DOT helsinki DOT fi> 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
- Raw text -