Page 1 of 1

Memory problem with QB7.1

Posted: Sat May 29, 2004 6:22 am
by jschuchert
Although I haven't used the dos version of my application for awhile, I recently found that I get an "Out of Memory" message when I try to load all 7 of its modules. It chokes after about 4 modules. I have Windows XP home as my os. I used to run it without a problem on Win 95/98 machines although I remember having this message before on one of those other machines and I had to fiddle with the config.sys file, himem.sys, etc. to correct it but don't know where to start with this system. I have 512MB now but even with only 8MB of extended memory previously it worked fine. Apparently XP uses it differently with MSDos. Anyone have any ideas? The program will not start from the IDE without all the modules loaded.

Re: Memory problem with QB7.1

Posted: Sat May 29, 2004 7:04 am
by Guest
Unless you are using a routine to use extended memory
like with an interrupt call, then the amount of extended
memory is of no value. PDS may possibly not be subject
to the 64k limit but probably is.

I would first check line lengths. This can affect it.

Are you using multiple modules that are "loaded" with
a mak file. This is what it sounds like, but if not, check that out. That can make larger programs and the compiler can compile each then link them together.

If you are doing it that way, perhaps one or more modules needs to be further broken up.

Large arrays can frequently cause problems.
Use REM $Dynamic and the /AH switch.

Other than that, you may have to go to multiple programs, using chain/common and brun71.exe (I guess
that's what the pds version of brun45.exe would be).

Hope something in there is usefull to you.

Re: Memory problem with QB7.1

Posted: Sat May 29, 2004 8:12 am
by jschuchert
thank you very much. No arrays. It may be worth it to do the work on a machine that I know can do it.

Re: Memory problem with QB7.1

Posted: Fri Jul 30, 2004 3:40 pm
by spuki
I too have a memory problem with the learning program that can be downloaded at http://amor.rz.hu-berlin.de/~h0444e1w/vokeng.htm.

It uses arrays and crashes whenever the files are longer than about 3*250 variables.

Unfortunately I do not understand what you wrote:
Use REM $Dynamic and the /AH switch.

Other than that, you may have to go to multiple programs, using chain/common and brun71.exe (I guess
that's what the pds version of brun45.exe would be).
???

Re: Memory problem with QB7.1

Posted: Sun Aug 01, 2004 3:46 pm
by Dr_Davenstein
What that means is...

At the beginning of your program add this line...

Code: Select all

'$DYNAMIC
Then on QB's command line options, add the /AH switch.
For example...

Code: Select all

C:/QB45/QB.EXE /AH
That's what one of mine looks like. You can also look at the command line options in QB under...
HELP/CONTENTS/QB COMMAND LINE OPTIONS

You may also want to look into using EMS\XMS to store your variables. It requires you to code a function to read/write the segment and offset for each variable, but the memory you gain for actual code is wellworth it.

Likely this will solve your memory problems

Posted: Thu Nov 11, 2004 8:44 am
by Harry
Go to properties of QBX.exe, click memory, set EMS to None, everything else to Auto and check uses HMA. You don't set compatibility to windows 95 or 98, and you can check the "close on exit" (optional), and then click OK. The system automatically creates the qbx.pif file that has the same attributes.

You can double click on either qbx.exe or qbx.pif and it will load any size file, which is a problem some of us have had. Does it work on your machine?