Jump to content
  • Advertisement

Archived

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

stodge

SDL Video and memory usage

This topic is 5751 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
Advertisement
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]

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.

Thanks

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!