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!

Memory problems with CLIPPER 5.2 and BLINKER 5.0 1

Status
Not open for further replies.

SYMAGDEV

Programmer
Jun 13, 2002
4
FR
I have built an extended program which is working 10 hours a day on a DOS 6.22 system with 8Mo of memory.

During execution, extended memory available is decreasing, and when the 7Mo are used, my program use all the conventionnal memory available.

At the end of day, before closing the program, I execute an other extended program using the blinker's swap function and message "1312: insufficient extended memory available to run program" appear. Sometimes, the program crash during the day when memory available is very low.

I have insert memory traces into my program, it use 2Mo of extended memory at the begining, and, after executing near 10 times the same operation (memory available doesn't decrease between the first 9 operation), the program allocate two other megabytes !
Is there anybody who can help me ?

- I compile my source code with CLIPPER 5.2 and /A/M/N/W options.

- This is an example of my link script :

BLINKER INCREMENTAL OFF
BLINKER EXECUTABLE COMPRESS 1
BLINKER EXECUTABLE EXTENDED
NOBELL

OUTPUT ExeName

FILE FILE1 # clipper program
FILE FILE2 # clipper program
FILE FILE3 # clipper program
FILE FILE4 # clipper program
FILE CFILE5 # C program

LIB COMM, TPOVl52, TPBLX52
@TPBLX.LNK

SEARCH BLXCLP52.LIB



- And this is an example of my CONFIG.SYS :

DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS I=A000-AFFF
DOS=HIGH,UMB
BUFFERS=50
FILES=120
DEVICEHIGH=C:\NET\IFSHLP.SYS

SHELL=C:\DOS\COMMAND.COM /E:2048 /P
COUNTRY=033,437,C:\DOS\COUNTRY.SYS



- In the AUTOEXEC.BAT, just the "SET CLIPPER=F120, BADCACHE" is interesting.


I am working on this memory problem from 3 weeks, and I have no idea how to solve it ! I Think I need help...

Thanks very much for your attention.
 
We had a similar problem in our softare at the office, there was a memory leak in the program where several of the programmers were lazy and did not decalre variables. If you do not declare your variables, one of two things happens.

1) Clipper automatically assumes they are MemVars

2) Clipper allocates memory each time the variable is recalled after you exit the procedure it was called in.

In Either case the memory is never let free again until the program is exited.

If you can exit the program then go back in and run the command with no problem that is probably what is happening

try manually compiling each prg file by doing

CLIPPER <prg file> /w

The /w will display all the variable warnings that you have. Do not worry about ANY thing that says GetList... that is normal... you can memvar it but it in not necessary.

Richard L. Hankins Jr.
Senior Programmer
Auction Services, Inc.
 
Thanks for answer, but I don't think this is really what is happening. I compile all my programs with the /W option and
I have no warning messages !

But if I compile them without the /N option, I have a warning &quot;C1004 Ambigious reference, assuming memvar&quot; for all
my PUBLIC variables (variables name are declared as memvar in a .CH included in each .PRG).

Any other idea ?
Thanks.
 
I think he meant lowercase 'w' Regards

Griff
Keep [Smile]ing
 
Did you try with xms105 himem memory manager for clipper.
If not, maybe I can help you.
Regards
 
I have search XMS105 on the web and I have just found something corresponding on a russian site. Functions given in the .OBJ files are usefull for programs running in conventionnal memory, and my program run in extended memory !
Do you have any other idea ?

I have used the MEMORY(3) function in all my program, to have the virtual memory available, and sometimes 64Ko of memory are used and never freed, each time in a other part of my program !

Thanks for help.
 
How many Variables are being defined as memvars constants etc.. in the header area of your main prg file? Richard L. Hankins Jr.
Senior Programmer
Auction Services, Inc.
 
I have 127 memvars defined in a header file which is included in each PRG file.
All variables are initialized as PUBLIC in the main program file and can be modified in all others program files, 30 of them are dynamic arrays (initialized with {}, elements are added with the ADD() function).
I haven't find any solution yet, so all idea are welcome !
Thanks.
 
Why not make all vars public once, at the start of your main module, and only reference them as needed??
But maybe I misunderstood your explanation s-)
HTH, TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top