1.

Solve : insufficient memory?

Answer»

Hello all--  greetings from South africa

I am writing some addins to some old dos programs that i USE in
my small factory.

I am using a pentium 4 and windows XP

I am getting a message "insufficient memory" .

There is however plenty of memory
 
Can anyone suggest a work around??

REGARDS ntambomvuAt what point do you get the error message? 

Are these batch files?

What kind of code are you writing?You could be running out of the 640k base memory... Are there any TSR's or other services for these dos programs that are eating up too much base memory.

run MEM at dos prompt and report back the figures shown

You can have tons of extended Ram like 2GB, but if you pull down your base memory too low then you can run into this situation with some dos programs. Newer programs use Windows OS with extended Ram, but if the programs were intended to address base memory addresses then you could be in this situation if not addressing extended memory.

Is this a Windows Alert or a DOS Program Alert to the memory insufficient. Also have these programs run before without problems or is this a new configuration?

Code: [Select]Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\dlembke>mem


    655360 bytes total conventional memory
    655360 bytes available to MS-DOS
    599072 largest executable program size

   1048576 bytes total contiguous extended memory
         0 bytes available contiguous extended memory
    941056 bytes available XMS memory
           MS-DOS resident in High Memory Area

C:\DOCUME~1\dlembke>
You should see something like this and "Largest Executable Program Size" is the key here...should be in the 580k ->640k range otherwise DOS programs may complain. The more the better and if less than 590k I would be looking for a way to get back 10k if say 580k

***Also run a virus scan to make sure system is clean...if an old floppy had a TSR virus on it it could also cause this low base memory issue.Many many thanks for the reply-- i thought that being a dos question that i would
be battling for an answer - but i was wrong- youir input is appreciated

> Are there any TSR's or other services

I really dont know - ?? how can i find out?

Running mem give the same answers as your screen shot except that
in my case the 

599072 largest executable program size
is 633,???  ( not quite 640 but more that your 599 >


>Is this a Windows Alert or a DOS Program Alert to the memory insufficient.

I am programming in dbase 4 ver 2 for dos and the error is being reported
by the dos program ( not by windows)



Also have these programs run before without problems or is this a new configuration?

No This is new code ---(while i  have many other programs in the same language- this is the first time I have seen this message) the message appears about half way through a data capture screen that uses many  say get statements and the complete entry page is 4 screens long- so I thinh that the page may be heavy for dos


***Also run a virus scan to make sure system is clean

I was AVG regularly and no problems reported?

Answers to further questions in you mail are

>batch files ---- not these are .prg files


> I am running dbase 4 ver 2 and the code is very basic data-capturing
stuff.
Well If you have 633k base then TSRs are not a concern. TSRs generally eat up base memory, but you have plenty.

You may be grabbing too much info and exceeding the buffer --> Quote

message appears about half way through a data capture screen that uses many  say get statements and the complete entry page is 4 screens long- so I thinh that the page may be heavy for dos
  Can you chunk it out a little into smaller portions for it to handle and piece the 2 halves together to get the entirety of it? Is there any static information for a good stop/start flag location in the page that can be used to tell it to grab the first piece of info until it hit that flag, then write to file, then grab and append the 2nd half to the end of that file, you then can open that file and use that any way that you need.
DBASE 4 is likely to understand neither Windows XP, nor the COMMAND.COM and CMD.EXE imitations of "proper" MSDOS.

In the good old days Bill GATES said that 640 KBytes was more than enough memory.
Ancient software is likely to interpret a GByte of memory as implausibly large, and decide it is a negative number because all memory has been used up.

There are error conditions that are new with XP, and were unknown with MSDOS.
Perhaps DBASE 4 gives a reasonable explanation of errors it is familiar with,
and anything else is covered by a "catch-all" of "insufficient memory".

Regards
Alan
This would probably mean that he would have to get say DOSBOX, since getting the actual thing would bring the same errors. DOSBOX is a substitute for the actual DOS, since its programmed to work in Windows.

You can probably run Dbase 4 in DOSBOX. Here's the link for DB:
http://www.dosbox.com/download.php?main=1

Hope this helps
,Nick(macdad-)Thank you very much-- you guys ( Dolls??) have been very helpful--

It is nearly 10Pm here so i will be forging onward with theis tomorrow__

I will post the results

best regards Fred
( big grin)Is Himem.sys enabled in your config.sys file ? ?Worth checking, but since XP doesn't normally use Config.sys at initialization as well as autoexec.bat I am not sure if that will HELP or not...on the DOSBOX it would definately help to have himem set for max base mem.Thanks for all the input

I found that the easiest thing was to break the code into blocks
and put a "read" statement before the line that caused the error and it
seems top be running well.

About DOSBOX--- I am interested but am a little scared of trying to fix something
that is not broken !!

What is dosbox actually? i

Is it a replacement of the old dos 6.22?

If i install it am I likely to have errors with the dos programs that i am using?

As I use Dbase on a network will it be nessessary to have dosbox on all the
workstations or is it ok only to use it for programming

regards fred

(By the way -- anyone who still uses dos probably also hates being ripped off with inkjet printer cartridge replacement costs. Well i think i have licked the problems of refilling- interested to know- just LET me know. No costs nothing you cant do in your garage

regards)


 DosBox is a sort of Port for Windows/Emulator of the actual MS-DOS.

DosBox shouldn't bring up the same errors, its designed for Windows which should allow it to handle the large amounts of RAM.


Discussion

No Comment Found