[Scummvm-devel] Memory usage

Neil Millstone neil at millstone.demon.co.uk
Sat Feb 18 17:50:01 CET 2006


Hi everyone,

I've been working on my ScummVM DS port, and have noticed something a 
little worrying.  The new GUI (which I understand is still under 
development) appears to add to the memory usage of ScummVM by around 
500Kb.  Most games seem to only need around a megabyte of memory for 
game data so this is quite a bit increase.

I built a few old versions from CVS, and the the memory seemed to spike 
when the new front end was added.  I ran some tests, loading the same 
savegame each time in Sam & Max (this is currently the most memory 
intensive game I can run):

cvs update -P -D "26 Jan 2006"
NDS Executable file size: 1289kb
Free ram in launcher: 2048kb (largest block 2048kb)
Free ram at title screen of Sam & Max: 1804k (largest block 1184k)
Free ram at World of Fish in Sam & Max: 936k (largest block 536k)

cvs update -P -D "28 Jan 2006"
NDS Executable file size: 1377kb 1
Free ram in launcher: 1940k (largest block 1960k)
Free ram at title screen of Sam & Max: 1168k (largest block 1144k)
Free ram at World of Fish in Sam & Max: 448k (largest block 416k)

SVN checkout on 15th Feb 2006
NDS Executable file size: 1452k
Free ram in launcher: 1824k (largest block: 1824k)
Free ram at title screen: 1048k (largest block: 1048k)
Free ram at World of Fish in Sam & Max: 336k (largest block: 312k)

As you can see, the free RAM in the launcher stays relatively stable, 
but once I'm in the game, there's quite a bit less available.  With the 
most recent build, Sam & Max crashes when it runs out of memory, while 
it's fine in the 26th Jan build.  Is there any chance that the GUI 
memory usage could go down?  Or perhaps there could be a low memory flag 
which makes the gui keep less buffers around, or perhaps free some of 
it's RAM while the game is running.

Thanks for your help,

- Neil






More information about the Scummvm-devel mailing list