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

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

Sorry, no dice.

I downloaded 4.03a and ran the code. It does not free the RAM on my system. This is Windows XP Pro. What were you using Derek? (Does it free it on Vista? My laptop is Vista -- I could try that.) I've tried this on other machines with v3.1, and got the same result. I can't remember if I've tried Vista though.

What about the Eu version? Are you using 4.03a or a more bleeding-edge version? Any super-recent changes to memory handling, garbage collection?

Anyway, not only did it not free the RAM, but it used way more of it too. With the same code as before (my code, with the loops), when the counter is at 50 I get: 878,522K used, 200,000K more than before! And it doesn't free it either. After setting x = 0 (or x = {}, no difference), it only goes down to 780,696, still 100K more than the 3.1 version used maximum.

Now then, if I allocate all that memory, but don't really fill it up with anything, like with the x = repeat(0,40_000_00) statement, it will release it all. But of course I would be filling it up with stuff, usually floating point data like in my example. I also tried pre-allocating the sequence with a repeat statement, but that actually makes it worse -- it is noticeably slower running when filling up the sequence (using indexes instead of concat), and then it doesn't really free up anything at all when setting x = 0. And pre-allocating usually isn't an option anyway, because these giant variables get filled up reading in giant files with unknown amounts of data in them, doing big database operations, etc. It just isn't practical.

So from where I'm sitting, it appears we're going in the wrong direction! What did v2.5 do that made it release the memory -- something to do with the Watcom malloc? If we compiled with Borland or other, would it work differently?

Thoughts?

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

Search



Quick Links

User menu

Not signed in.

Misc Menu