Skip to main content
GameDev.net gamedev.net
🔒 Locked

SDL Video and memory usage

Started by stodge Jan 21, 2003 at 10:34 AM 1 replies 400+ views
Original Post
stodge
stodge
When I open an OpenGL window using SDL my application's memory usage jumps by 5Mb. Is this normal (I presume it is!)? What causes this? I mean what does SDL grab the extra memory for? This is my call to open the window:
  if( SDL_SetVideoMode( width, height, depth, flags ) == 0 )  
Thanks [edited by - stodge on January 21, 2003 11:37:12 AM]
---------------------http://www.stodge.net
Prefect
Prefect
What's in the width/height/depth/flags variables? (I know that you set video modes with SDL_SetVideoMode, duh)

More importantly however, how do you measure the memory consumption? In Linux, shared memory maps add to the overall memory footprint. That's why e.g. the X server uses so much memory (it mmaps the graphics card's memory). Maybe there's a similar thing going on in your case.
Use a different program to check whether physical memory usage goes up just to check whether the memory usage you're seeing is real or not.

Oh, not to forget that depending on how you link with the OpenGL library, SDL_SetVideoMode() might have to load the library into memory...

cu,
Prefect

[edited by - Prefect on January 21, 2003 2:32:41 PM]
Widelands - laid back, free software strategy
stodge
stodge
Sorry this is under Win2k. I''m using the Task Manager. When I step over the SetVideoMode call, the memory usage of the application jumps by 5Mb.

Thanks
---------------------http://www.stodge.net

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.