Jump to content
  • Advertisement
Sign in to follow this  
danromeo

How to monitor video card memory

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

How can I see the contents and allocations of my video card memory, either in real time or in Pix or any other (free) diag program?  How can I poll the available video memory from a program before making allocations?  What is the best way to fine tune allocations to video memory?  I just realized that allocating beyond the available memory seems to crash the computer with no warning.  How do I avoid this while still taking advantage of the full available memory?  I'm using XNA at the moment but am porting to Sharp DX.  

 

Thanks 

Share this post


Link to post
Share on other sites
Advertisement

I don't think it is possible to monitor all memory allocations and their locations for video memory.  On modern architectures the GPU memory is virtualized, meaning that more than one process will have GPU memory allocated at any given time (including Windows itself).  I believe the switch to DX10+ will help you in this situation, since DX9 was not a virtualized memory model. 

 

What you can do is to monitor your own memory allocations.  Anywhere that you allocate an object that resides in video memory, you can track it and keep a record of how much memory you have consumed.  Then this can be compared with the physical video memory of the system, which can be acquired through DXGI interfaces.

 

May I ask how you found out that the crash was caused by allocating too much memory? 

Share this post


Link to post
Share on other sites
AFAIK, nothing you can do in a normal user space process or in/with XNA/DirectX should be able to crash the system, only your own program. In CUDA, with messed up pointer arithmetic, you can crash the display driver, but HLSL doesn't expose any pointers.

Can you build a minimal working (== system crashing) example program?

Share this post


Link to post
Share on other sites

In general there is usually no need for the fine-grain video memory query that you required. The api you are using should provide some facility to report out of memory exceptions. As long as you check for these and act according, you should be able to accomplish your said goal. I know is more reactive than proactive, hope that helps.

Share this post


Link to post
Share on other sites


AFAIK, nothing you can do in a normal user space process or in/with XNA/DirectX should be able to crash the system

 

Assuming some sort of ideal driver free from bugs.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!