Re: free seems not work

new topic     » goto parent     » topic index » view thread      » older message » newer message
AndySerpa said...

I have "griped" about Eu not releasing memory back to the OS, but only very large amounts. If you have a program that eats up a ton of memory with some initialization routine, but then never needs it again, Eu will hold onto it forever (mostly -- it will release maybe 25% of it) even if you release the variables holding it (i.e. ref count = 0). I'm talking 100s or 1000s of megabytes not available to other programs and un-needed by the Eu program holding onto it. I thought this would no longer be an issue with Eu4.0 cause you can compile with "system managed memory", but I tried that and it seemed to have no effect. But I've moved to Windows 7 64-bit since I last had this discussion (used to use XP 32-bit), so maybe the Windows memory management is the difference -- it does seem to do a better job swapping out the Eu memory hogging program now if another program needs the RAM, but I don't see why the Eu program needs to hold onto it at all in such huge amounts.


I also have asked for a way to free memory used once and not needed again. I figure it just won't happen in Euphoria, using 32bits for each 7bit ascii character is the norm. A few people have found ways around this (C strings outside Eu, compacting multiple "sequence strings" chars into 32bit "integer" bytes, etc), but it's not included in Euphoria releases. As for apps that use gobs of memory, find a way to run them as external programs (i do not mean Eu tasks), and then kill them when done. There's a number of "shared memory" include files in the archives for moving data about between the programs. I doubt that will ever become a built-in for an Eu release either. You can also break up data and keep it on a harddrive, i do this often for multi-gigabyte files. I also use multiple computers at times on a gigabit lan to get around these limitations.

useless

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

Search



Quick Links

User menu

Not signed in.

Misc Menu