Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conventional Memory Exhausted error in XP

Status
Not open for further replies.

jmahana

IS-IT--Management
Jun 21, 2001
2
IN
Hi Clipper gurus,

I am using clipper 5.01 with rtlink. Till now the pkg is running fine in 100 odd location. Recently the management had updated all the H/w to PIV with 256 MB RAM with Window-XP.

On this new machine we are getting the conventional memory exhused error without changing any thing in the pkg.

entries in config.nt is
dos=high,umb
device=himem.sys
files=250

& in autoexec.nt
set clipper=f200

pkg is being used for invoicing purpose. Pkg works find for some time & after some time it gives this problem & quits. after reloading the pkg it will work find for some time & againg it start give me this error.

Pl. help me out

Thanx & regards
 
Hi,

Check out your conventional memory on XP with
mem /c/p, it will be low enough to give you such
problems. I hope to be wrong but it's a problem
on XP which won't let you to handle the conventional
memory no matter all tries you make. XP won't
respond to a config.sys file or the DOS program
properties on Windows. Millenium had the same
problem but somebody made a patch to let user
configure the conventional memory.

I'll be more than glad if somebody knows how to override
such problem too.

Regards,

Jalm
 
and don't forget to turn off expanded memory, by adding E0 giving
Code:
set CLIPPER=F200;E0
to your clipper setting

HTH,
TonHu
 
Thanx of suggestion. problem had been sorted out by putting clipper=f200;e0


Regards
jiten
 
Where does this SET CLIPPER=200;E0 go on the XP machine and must this also be in other machines running windows 98?
 
Hi, fbizzell

In XP:

- right click my computer
- click properties
- click advanced tab
- click environment variables button
- click on new, either user or system variables as appropriate
- variable name is clipper
- value is f200;e0

Yes, it is needed also in win 98, but there you add
set clipper=f200;e0
to autoexec.bat

Jock
 
Hi JockMullin

Does this set clipper=f200;e0 work on Windows 2000 professtional?
 
In c:\winnt\system32 there is config.nt and autoexec.nt, that is where the commands need to go.

Regards,

Mike
 
To: mspratt

Thanks, that helps some but I am sometimes still getting the "memory exhausted" when I do certain things in the application. I think I need to do some more overlaying or something.
 
Hi, fbizzell

Wow, old threads never die!

If your app is near the max of memory then you can get into problems if memory is not well managed. A good linker can help a lot, especially with garbage collection and overlays, but not as much as good programming practices.

Local variables in frequently called functions or procs can lead to memory fragmentation - sometimes its better to make them global so they stay allocated rather than coming and going. Declare arrays at maximum size rather than dynamically. If clipper has to get more memory and there isn't enough clean memory available in what is currently allocated then it will try to allocate another block, which can take you over the top when memory is messy but may be OK when it is clean.

I have found a fast fix for a lot of older programs is to save their forms or screens as text files and then ??memoread('screen1.txt') rather than @ saying a bunch of literals or saving/restoring screen. Often it's better to put stuff into the code segment by using functions rather than having it in the data segment as literals or constants - for example @12,20 clear to 12,60 is better than @12,20 say '<many spaces>'.

Anything you can do to reduce symbol table size will help a lot. Scatter/gather to arrays is way better than saving database fields to memory variables in terms of memory usage and makes it much easier to release the memory when you are finished with it.

But if you really need to keep the app alive, consider porting it to harbour.

Vista will blista ya mista.

Jock
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top