www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/12/03:06:11

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: performace questions
Date: Wed, 11 Dec 1996 21:06:49 +0000
Organization: None
Lines: 32
Distribution: world
Message-ID: <R8MHoQApJyryEwpX@talula.demon.co.uk>
References: <01bbe739$d1ef65a0$78335dcf AT monkey>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
CC: pachydrm AT ix DOT netcom DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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