hi victor,
so i've noticed that if you open a file and mecway takes a lot of memory it doesn't release it if you open a different file. it keeps the memory it took from the larger file. the only way to clear the memory is to close mecway and re-open it. this isn't related to the solver. i watch the memory as it solves and that is taken and released as expected. just with the mecway process.
Comments
33 MB no file
2325 MB opened once
3695 MB opened twice
3460 MB ...
4731 MB
3801 MB
3020 MB
2997 MB New file (empty)
330 MB After waiting a few minutes then doing some simple general use like making an element and clicking on things.
So I can't see any obvious memory leak. Temporarily growing memory use is normal since Mecway uses .Net which is garbage collected so memory that's no longer needed can sit around still allocated until whenever the garbage collector decides to free it, which can be triggered when available physical memory is low. So if you have a lot of RAM, it's reasonable that it will use more than it needs. It doesn't cost anything.
Have you seen negative effects like other programs running slower because of lack of memory? If not, then I think it's OK to ignore.
sorry i didn't think it would be hard to duplicate. i will try to find the files i saw it with and send them to you. it's like sergio said. i have 8gb but 3.5 is already used by windows. i open the file and mecway takes another 2 gb. so i don't have much left for the solver to use. but that wouldn't really change with this issue. it's more of a convenience thing. mecway won't release it even though it no longer needs it. if you open a small file next it still holds the 2gb. you have to close mecway and reopen it for it to take the appropriate amount. so not a huge deal. but if it's something you could tweak, i think it would be good. the pardiso solver seems very good about taking and releasing memory. it also seems pretty frugal with memory as well. so those are both good things.
prop_design - Yes, please show the results, especially after repeated file opens to see if it's accumulating and eventually exceeds physical memory or not. I'd also like to see that it has a negative impact on other applications before trying to do anything about it.
i'm just curious how much memory windows uses on your computers. i think victor has said he has 16gb of memory and sergio said he had 32gb of memory. i guess on my laptop the 3.5gb of usage was with my web browsers open. i also have some hardware monitors running in the system tray and taskbar. as well as open shell. if i close the browsers it drops from 3.5gb to 2.4gb. i'm curious how much windows will take if i get a laptop with more memory in the future. i attached some pics of the memory usage. this is before opening mecway or anything else.
I left it in that high-memory, no-model state and opened 5 other instances of Mecway, each with the big file. When I got to the 5th one, memory used by the empty Mecway dropped from 2.5 GB to 400 MB and later to 40 MB without me doing anything to that instance at all. That happened just below the limit of physical memory on my computer. The memory was released as soon as it was needed by another process so I don't think it's a real problem, just an illusion of the memory usage meter.