Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 May : Memory release problem

www.cryer.info
Managed Newsgroup Archive

Memory release problem

Subject:Memory release problem
Posted by:"Brian Ellul" (brianell..@ecenglish.nospan.com)
Date:Thu, 17 May 2007 12:38:18

Hi

Not sure if this post belongs here, but here it goes!

I have a Delphi executable (main) which call another executable (child)
which processes data and exports it to an excel file. Once this second
program finishes, it closes and control returns to the main exe.

The main program is just 473K large while the second one is 1.2M.

Running by itself the second program, I can see the PC RAM usage go up by
some megs (mostly while exprting to excel) and that's not a problem
whatever. My big problem lies when the main program opens the child program
and the child program is executing. I can see the RAM usage go up even to
3Gbytes (Pysically I just have 1 Gybte). I can't understand why it's taking
so much RAM to execute when running on it's own it just take a couple of
megs. To add to this problem, when the main program closes the child, the
memory is NOT RELEASED!!!! but released only on closing the main program.

I'm using the CreateProcess to open the child program...

Any help would be greatly appreciated...

Regards
Brian

Replies:

www.cryer.info
Managed Newsgroup Archive