Jump to content
  • Advertisement
Sign in to follow this  

Too much memory used by OpenGL app

This topic is 2773 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


I was wondering why my program takes so much memory?
As you see, over 112 MB


Even when not drawing anything on screen?
What could cause this?

For example loading / initializing all OpenGL extensions can do this?
I just don't understand what can eat so much memory.

I disabled texturing, i disabled any rendering. And still?

Any ideas? Anybody had such problem?


Share this post

Link to post
Share on other sites
Remember that your program does not live in isolation, and is not composed of just the code you write (in fact your code is a very small portion of the total). As well as your stuff, your program is also loading lots of DLLs, including your graphics driver, various Windows DLLs, and potentially sound, input and networking drivers too. These all make a contribution to the total memory used. In addition to this it needs to allocate stack space, heap space (every program has a default heap), and so on. Your graphics driver needs to allocate video RAM for it's framebuffer, which in OpenGL is typically backed up by a system RAM copy (the same applies to any textures you create). In other words there's lots of stuff going on behind the scenes which you don't have control over.

So even something like GLQuake (which originally needed to run on a first-gen Pentium with 16 MB RAM) uses about 76 MB of memory on my PC, for example.

Also note that the memory usage displayed in Windows Task Manager is not the actual physical RAM being used.

So don't sweat the details of this. Worry about the memory you explicitly allocate and deallocate in your own code for sure, but expect the OS to be also doing it's own memory allocations behind the scenes.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net 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!