Advertisement Jump to content


This topic is now archived and is closed to further replies.


SDL Video and memory usage

This topic is 5842 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post

Link to post
Share on other sites
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...


[edited by - Prefect on January 21, 2003 2:32:41 PM]

Share this post

Link to post
Share on other sites
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.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!