Minimize & Memory
BlitzMax Forums/BlitzMax Beginners Area/Minimize & Memory
| ||
Hi, I run my application, the GCMemAlloced() function says the application takes about 25 KB all the time. The Task Manager says it takes about 5 MB all the time, until I minimize the window and bring it back up, then the application only takes about 900 KB according to the Task Manager. Which one is to trust? Thanks :) |
| ||
Both/Neither. They do different things. GCMemAlloced clearly says in the documentation that it is *only* reporting managed memory. Anything you have allocated which is not managed by the Garbage Collector is not reported here. EDIT: To clarify, this means BlitzMax objects only. Objects are any Types you have, as well as things like Arrays and Strings which are also objects internally. So the correct one to trust depends on exactly what it is you're trying to find out. |
| ||
Yeah okey, I got that. But what about the strange Minimize thing? :S Thanks :) |
| ||
Yeah okey, I got that. But what about the strange Minimize thing? :S At some point, the app will have used up to 5MB of memory, when you minimize, the app is told to release any unused memory, when you restore the app, it claims some back (for display, etc.). |
| ||
Can't I release any unused memory myself then? :O Thanks again :) |
| ||
Can't I release any unused memory myself then? No, and its not something you have to worry about. If windows needs the memory it will claim it. |
| ||
Oh okey, Great. I just like the look of the application taking less than 1MB of memory. =D Thanks for the clarification! :) |