SDL Video and memory usage

Started by
1 comment, last by stodge 21 years, 3 months ago
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
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]
Widelands - laid back, free software strategy
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

This topic is closed to new replies.

Advertisement