1. Leak fixed

I created a .bat file to run a Windows Euphoria program
many times per second in a loop.

The system monitor crept up slowly, showing a small leak.
Virtual memory (system swap space) was getting 
slowly eaten up.

I replaced the call to the (ANSI C !) exit() 
at the end of the interpreter, substituting
ExitProcess(). The leak is now completely gone.

I had assumed that on Windows, WATCOM's exit()
would call ExitProcess(), but apparently it doesn't.
ExitProcess() is the normal way to end a WIN32 process.
It cleans up a bunch of resources, including .dlls.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » topic index » view message » categorize

2. Re: Leak fixed

Excelent news!

Allthough I might suggest to code this instead;

#ifdef WIN32
   Exitprocess();
#else
   exit();
#endif

It's more portable.

Mike The Spike

--- Robert Craig <rds at RapidEuphoria.com> wrote:
> I created a .bat file to run a Windows Euphoria
> program
> many times per second in a loop.
> 
> The system monitor crept up slowly, showing a small
> leak.
> Virtual memory (system swap space) was getting 
> slowly eaten up.
> 
> I replaced the call to the (ANSI C !) exit() 
> at the end of the interpreter, substituting
> ExitProcess(). The leak is now completely gone.
> 
> I had assumed that on Windows, WATCOM's exit()
> would call ExitProcess(), but apparently it doesn't.
> ExitProcess() is the normal way to end a WIN32
> process.
> It cleans up a bunch of resources, including .dlls.
> 
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    http://www.RapidEuphoria.com
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu