How to determine memory requirements?

BlitzMax Forums/BlitzMax Beginners Area/How to determine memory requirements?

MGE(Posted 2008) [#1]
To advertise that my game requires "x" amount of memory, what's the best way to figure this out? Thanks.


Gabriel(Posted 2008) [#2]
Try it on a machine with "x" amount of memory and see if it works acceptably. You could estimate by opening Task Manager while the game is running, counting the memory usage, and then adding in whatever overhead the OS might have. Of course, this will vary between OS version though, so it's still a bit grey. I guess the general preference would be to count the supported OS with the least overhead, but if that turns out to be Windows 95 or 98, which almost no one is using, it could be misleading. Personally, I'd count it on XP, as that's what the average person will be using, and Vista users are less likely to be short of ram anyway.


GfK(Posted 2008) [#3]
For what its worth, Magicville runs perfectly well on my P3-733MHz system with 256MB RAM and WindowsXP.

That's low enough, so, I'll put that.


MGE(Posted 2008) [#4]
Thanks for the comments, I appreciate it. :) My development machine is a 512mb XP system and it's running fine with Blide IDE open, a few IE windows. So I guess I can get away with saying "Requires 512mb".


therevills(Posted 2008) [#5]
MGE, in your dev machine how many memory sticks do you have for your 512MB? Just one 1 x 512MB stick or is it made up of multiple memory sticks (eg 2 x 256MB, 4 x 128MB)?

If its 2 x 256MB you could remove one and test to see if your game works okay with just 256MB...


iprice(Posted 2008) [#6]
Now for a really dumb question - which is the actual memory usage of a game+OS and all other running apps? I've never worried before as most of my games have been very small, but I'm now making a game that has lots of media assets.

There are loads of different values in four headings
Totals
Commit Charge
Physical Memory
Kernal Memory

There's also a PF Usage value.

Which set should we/I be looking at?


xlsior(Posted 2008) [#7]
Now for a really dumb question - which is the actual memory usage of a game+OS and all other running apps?

There are loads of different values in four headings
Totals
Commit Charge
Physical Memory
Kernal Memory


I assume you're talking about vista?

The number you are looking for: In the task manager, performance tab: There is a green bar graph with 'memory' above it. The number in there is the amount of memory actively in use by windows and all programs running on your PC.
(The actual amount used may be higher, but that includes automated pre-emptive caching by the operating system, to speed up loading data that you 'may want' soon. If a program needs extra memory the cached content will automatically be dropped and the real desired data will be loaded in its place. Likewise, the PF (page file) has a ton of crap in it as well, but part of that is just cached information in a more easily digested form and not necessarily required)


iprice(Posted 2008) [#8]
Sorry, I should have stated I'm using XP.

There is no bar graph for "Memory" in the performance tab of my Task Manager - the two bar graphs are for CPU Usage and PF Usage.


tonyg(Posted 2008) [#9]
Aren't there memory figures below it?


iprice(Posted 2008) [#10]
There are, but which value am I supposed to be looking at?



I'm presuming it's Physical Memory (Available minus Max application when running), although the PF value start and when running is very similar in value to the Available - Max app running.

Therefore it looks as though I'm using about 150Mb in my game.


MGE(Posted 2008) [#11]
@therevills - Good idea! But...er.. I hate digging around "inside" the box. lol.. Will give it a shot this weekend though. ;) Thanks!


MGE(Posted 2008) [#12]
In my game according to the "Process" - "Mem Usage", I'm hovering around the 100mb size. Is that accurate?


ziggy(Posted 2008) [#13]
As long as there are not being memory swaps to disk, I would say it is very acurate. there's no way to sort out how many of this memory is being set by the OS to the process to accelerate memory allocation demand by the process, but it is a good indication of how is your program behaving.


tonyg(Posted 2008) [#14]
@iprice. Check your total-available before running your program.exe. Then start your exe and check how it changes. Also in the process tab select : View / Select columns /Peak Memory Usage and play your game/run your app.


iprice(Posted 2008) [#15]
Yep, it confirmed the 150Mb that I stated earlier. Cheers TonyG.


Czar Flavius(Posted 2008) [#16]
If you have a lot of free system ram, Windows will give programs more memory than they need, to speed things up when they require more. Thefore the memory usage needed by the program might be inflated when using a high-ram system.

Is that correct peeps?