Mail Archives: djgpp/1996/12/12/03:06:11
jd marrow <pachydrm AT ix DOT netcom DOT com> writes:
>i've run into a 'problem', however, regarding irratic performance (even
>within the same run) under win95 in a dos box and "win95-dos" (i'm using
>allegro for grfx):
>
>= a 3d program, for eg, will run sometimes at 32 frames-per-sec, and then
>at other times at 20 frames-per-sec, although it's doing exactly the same
>thing...
What else changes as the speed of your program alters? In a win95 dos
box I would expect the speed to be unstable if any background processes
kick in, and even if your program is the only task, win95 doesn't always
generate timer information very reliably. In a clean dos session, it
should run steadily as long as your program isn't doing anything extra.
It is possible that the problem could be caused by virtual memory being
swapped in and out. Does the disk access light flash while your program
is running? And when you run go32-v2, how much DPMI memory does it
report available?
>why might this be? what exactly is LOCK_VARIABLE supposed to do? how can i
>avoid this sort of problem?
LOCK_VARIABLE is a helper macro for locking the memory which contains a
global variable, in order to prevent it being swapped out to disk. This
is required for all the memory used inside interrupt handlers, but you
shouldn't need to use it in normal program code.
/*
* Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
* Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in nation'.
*/
- Raw text -