• Advertisement
Sign in to follow this  

Video memory not released after quit

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

Hello everyone. Any of you ever used MemStatus ? It's a freeware which monitors RAM and Video RAM usage. I experience a weird behavior on some machines which I did not think was possible: after I quit the game, the freeware reports some video memory to be still in use. I must admit the game is not closed as clean fully as I would like it to be, however I did not know that video memory could remain allocated when the game's process is terminated. Have you ever experienced this ? I'd appreciate anyone who ave experienced that kind of behavior before to share it's experience here with me. Thanks a lot :) JA

Share this post


Link to post
Share on other sites
Advertisement
Does opening and closing the application several times cause the used memory to increase each time?

It isn't uncommon for memory (either Video or just System) to remain used after the first time your application runs, and this doesn't necessarily mean you are leaking it. It's quite possible the driver allocates some inner buffer on the first time your application runs, and doesn't release it immediately. To you, it would see as though your application was "leaking" memory, but in reality the behaviour is intentional.

How much memory are we talking about?

Share this post


Link to post
Share on other sites
Yup, the memory increased each time by something like 10 mb.
I wish I could be more specific but the behaviour was not consistent when we tried the same executable on another machine, or another build of the game on the same machine... Thanks for the reply anyway.

Share this post


Link to post
Share on other sites
If you find that video memory increases every time you minimize and re-focus your application (every time you alt-tab out and then back in to your program), then chances are you have a memory leak.

Because you lose things like textures when your application goes out of focus, you usually write something to load them back in. If you haven't properly released them, however, you're just sucking up more memory when you re-load them.

Look for something like that - make sure that you letting all the necessary resources go when you minimize your application. That way you can reload them and use the same amount of memory you were using BEFORE you minimized.

I don't know if it would show up on every machine. But, if it does happen on a particular machine, it should be consistent - running it from the same state and testing it again on that same machine should produce the same problematic results.

As for another build not showing problems - you may have inadvertently fixed (or simply avoided) the problem with that other build.

Share this post


Link to post
Share on other sites
Another good dingleberry of advice is to hit the "break on memory leaks" in the DX control panel

Share this post


Link to post
Share on other sites
It's difficult and devious to gauge memory leakage from the global memory pool. Particularly on recent operating systems and their service packs (notably Windows Vista), memory is often left committed after use, when resources are abundant. I suppose it makes sense to keep something in otherwise idle memory on the off-chance that it will be used again. This is why games often load up much quicker after they have just quit.

I suggest you get hold of a dedicated memory-leak detection tool. That way you can be sure what is your doing and what the OS and drivers are responsible for.

Admiral

Share this post


Link to post
Share on other sites
Quote:
Original post by stanlo
Another good dingleberry of advice is to hit the "break on memory leaks" in the DX control panel

Yea, or just even look at the debug output when you close your application. If you are leaking resources, D3D will tell you about it. If you aren't leaking anything, then you know that you are doing things correctly and it's just something that the OS or driver is doing behind the scenes.

Share this post


Link to post
Share on other sites
Yup, there are definitely D3D resources that are not released. The thing I don't understand is shouldn't these resources be automatically destroyed anyways when the process of the game is terminated ?

Share this post


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

  • Advertisement