Re: Memory usage on Win32: Euphoria usage vs. what Task Manager displays

new topic     » goto parent     » topic index » view thread      » older message » newer message

According to my understanding, earlier versions simply used the c malloc() function which did not release memory to the system. A large block of memory was recycled as needed. This was changed somewhere around version 3. I think the latter behaviour is to be prefered, but the practical differences aren't as great as you might think.

Applications don't allocate RAM, they allocate from their private address space. How much RAM they get to populate that address space is up to the OS, not the application. The OS bases it's decision on how the app is using the RAM it was assigned and how much is avaiable. If an application has a low page fault rate this indicates to the OS that the app probably has more RAM than it needs and will trim it back in favor of applications that need it more. If plenty of RAM is available this won't happen - but what does it matter?

A true memory leak is another matter entirely. In this case the application is continuously asking for more memory and never giving it back. If unchecked this can lead to the misbehaving app failing, and possibly others as well. The OS can't tell the difference between legitimate memory use and a leak.

I am sure that experienced developers know this already but others will not.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu