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!

insufficient memory - an update

Status
Not open for further replies.

Gilesy

Programmer
Jul 2, 2002
40
GB
You may recall that recently I posted a question asking why I was getting this. Thanks to all those who replied, but I beleive my colleagues and I have got to the reason why. (But not the answer.)
If you run this code: (use any report and table.)

USE <anytable>
last = VAL(SYS(1016))
FOR x = 1 TO 100000
WAIT WINDOW &quot;x=&quot; + STR(x) + &quot;: Memory Handles:&quot; + ;
SYS(1011) NOWAIT
? &quot;Number:&quot;, x, &quot; User Objects:&quot;, SYS(1016), &quot; Mem Available:&quot;, SYS(1001), &quot; Last:&quot;, last - VAL(SYS(1016)), &quot; SYS(1011):&quot;, SYS(1011)
GO BOTTOM
REPORT FORM <anyreport> REST TO FILE mem.txt NOCONSOLE
last = VAL(SYS(1016))
ENDFOR

Eventually it will crash with insufficent memory. We found that the undocumented function sys(1011) shows the number of memory handles being used and that continually increases until fox falls over. Debugging shows it increases at the report form command (this does not happen in VFP6).

Any suggestions for answers to this extremly annoying problem would be gratefully received.
 
If this is FPW, are you running it under Win 3.x or NT 3.51? Since these are the only OSs it was tested under, I guess this &quot;failure&quot; is just one more thing that doesn't work in the new OSs - not really a suprise.

I'm curious, how many times do you run 100,000 reports in a day? Does the tip over failure point depend on the OS or the amount of memory on the system?

Is it possible to upgrade to the app to VFP 8.0?

Rick
 
Just as a side note Rick, at a company I worked at previously, we had mailings that were 2 page reports. 1st page letter size, 2nd page legal. We would scan through the table something like:
Code:
SCAN FOR !lPrinted
  DO CASE
     CASE <condition1>
        REPORT FORM ltrForm1 NEXT 1 TO PRINT
        REPORT FORM lglForm1 NEXT 1 TO PRINT

     CASE <condition2>
        REPORT FORM ltrForm2 NEXT 1 TO PRINT
        REPORT FORM lglForm2 NEXT 1 TO PRINT

     CASE ...
        ...

  ENDCASE

  REPLACE lPrinted   WITH .T.
  REPLACE dPrintDate WITH DATE()
ENDSCAN
We sent out thousands of mailers each day. I can see running 100,000 report forms per session easily.


Dave S.
[cheers]
 
Thanks Dave S.

Printing directly is not a problem. They send it to a file.
Then it's a problem!
[bugeyed]
 
There have always been memory leaks. How to get rid of them without shutting down is a puzzlement.
Even though you are printing to a file, have you tried the usual things like:

SET PRINT TO
SET PRINT OFF

etc., between report runs?

I dunno.


Dave S.
[cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top