if( SDL_SetVideoMode( width, height, depth, flags ) == 0 )
SDL Video and memory usage
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:
Thanks
[edited by - stodge on January 21, 2003 11:37:12 AM]
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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement