Re: Memory usage on Win32: Euphoria usage vs. what Task Manager displays
- Posted by bernie Jul 30, 2009
- 1007 views
There also may be a bug in 3.1 Euphoria it definitely changed how it releases memory under Windows between 2.5 and 3.0 (or maybe it was 3.0 and 3.1, can't remember). It used to be you could use a huge chunk of memory processing something, and then release it by setting the variables to null (i.e. var = {}). This stopped working in v3.1. It then held on to the memory, and you could re-use it (without it growing further, so it wasn't a total memory leak), but if you weren't going to reuse, you could never get the application to give it up. I had a number of pre-3.1 programs that did some big processing like this when they started up, but then released it. I had to rewrite them for 3.1 and break them up into two programs chained together because they were long-running programs and they'd continue hogging system resources forever after they were finished with those resources. I used to be able to run several of these programs simulataneously, but with 3.1 it would practically crash the system.
I reported this several times, but couldn't get anyone to pay attention, only getting the response that memory handling hadn't changed and it was "complicated". But it can be easily shown running the same code that v2.5 will release the memory and v3.1 won't. Haven't tried v4.0 yet.
Andy:
Are using ver. 3.1.1 ?
This is may have had something to do with it.
Euphoria Release Notes
Version 3.1.1 August 2007:
This release is a minor update to fix some bugs.
Bug Fixes
- bug fixed: A storage leak (memory allocated but never freed) was introduced in version 3.1, on the Linux and FreeBSD platforms. Fixed by Matthew Lewis.
Also if you are using win32lib it used some of its own
memory management and the version you are using may have
a bug in it.