Page 1 of 1

Memory problem

Posted: Mon Mar 16, 2020 10:14 pm
by RPC
Hi
I am getting following error message when I try running my program.

Application Internal Error - D:\HMG-SAMPLES\hmgforum\DQuotes2\Dquotes.exe
Terminated at: 2020-03-17 02:52:11
Unrecoverable error 9006: hb_xgrab can't allocate memory
Called from TYPE(0)
Called from _ISCONTROLDEFINED(1143) in source\h_controlmisc.prg
Called from GETPROPERTY(8735) in source\h_controlmisc.prg
Called from DOWNLOADFILE(3404) in D:\HMG-SAMPLES\hmgforum\DQuotes2\DQuotes.prg
Called from DNLDBSE(2376) in D:\HMG-SAMPLES\hmgforum\DQuotes2\DQuotes.prg
Called from DNLDALL(3046) in D:\HMG-SAMPLES\hmgforum\DQuotes2\DQuotes.prg
Called from (b)MAIN(495) in D:\HMG-SAMPLES\hmgforum\DQuotes2\DQuotes.prg
Called from _DOCONTROLEVENTPROCEDURE(6056) in source\h_windows.prg
Called from EVENTS(1801) in source\h_windows.prg
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5717) in source\h_windows.prg
Called from _ACTIVATEALLWINDOWS(5779) in source\h_windows.prg
Called from MAIN(906) in D:\HMG-SAMPLES\hmgforum\DQuotes2\DQuotes.prg
------------------------------------------------------------------------

Can anyone help me solve my problem.
Thanks

Re: Memory problem

Posted: Tue Mar 17, 2020 1:30 am
by martingz
Hi RPC , i have this problem when read more 40,000 XML archives , i resolved add this line
every 10,000 files read

hb_gcAll()

Re: Memory problem

Posted: Tue Mar 17, 2020 10:58 am
by RPC
Hi martingz
Thanks for the reply.
I am actually downloading files from net, though the number of files is large a lot less than even 10000 .
I will try your solution and see if it works.
Many thanks