I’ve been working on my game, and I noticed that System Monitor says its
taking up 150 MB of ram. Its a simple game, and should be using that
much, so I began trying to figure out why it was using so much. I kept
working with it until I came up with this TINY bit of code that uses 135
MB of ram:
Are you sure you’re reading the right field? It’s easy (and harmless)
for an app to use a lot of virtual address space. In ‘ps aux’, you
should be reading the RSS field, not VSZ.On Thu, Dec 19, 2002 at 09:30:37PM -0600, Brad wrote:
Is there a problem with SDL or is there a (GOOD) reason why its using so
much RAM?
I’ve been working on my game, and I noticed that System Monitor says its
taking up 150 MB of ram. Its a simple game, and should be using that
much, so I began trying to figure out why it was using so much. I kept
working with it until I came up with this TINY bit of code that uses 135
MB of ram:
The memory reporting is counting the 128MB of video ram on your video card
toward the memory used by the application. That’s because all memory maps
are counted in the memory accounting, and the video card is memory mapped
into the process address space by the NVidia drivers. Don’t worry, it’s
not really taking that much RAM.
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment