Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How to monitor video card memory

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1 danromeo   Members   

238
Like
0Likes
Like

Posted 30 June 2014 - 11:46 AM

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 



#2 Jason Z   Members   

6430
Like
1Likes
Like

Posted 01 July 2014 - 05:27 AM

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? 



#3 Ohforf sake   Members   

2052
Like
1Likes
Like

Posted 01 July 2014 - 06:11 AM

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?

#4 cgrant   Members   

1786
Like
0Likes
Like

Posted 01 July 2014 - 12:47 PM

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.



#5 Chris_F   Members   

3030
Like
0Likes
Like

Posted 01 July 2014 - 01:30 PM


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.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.