Re: EvictManagedResources

From: n! (nfactorial_at_nomailplease.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 04:34:25 +0100


> The SDK documentation says what the Device->EvictManagedResources()
> method does, however I have seen any appropriate usage publicly. The app
> I'm working on has a lot of heaviliy detailed textures concurrently
loaded,
> and at times especially Matrox cards(their drivers suck) throws up the
> occasional D3DERR_OUTOFVIDEOMEMORY. So i thought i could use
> this method to free video memory when creation of additional textures
fail.
> Can somebody comment on the pros and cons? Is the usage safe? My app
> is not a game, its a commericial video app, cant afford to jinx even one
frame!

Are you trying to create any Pool.Default resources? If so, you should try
and create those first. If you're unable to allocate them first then calling
EvictManagedResources prior to create the default resources may help.
However, you shouldn't be allocating default resources frequently, just once
and then re-use them.

If you're not using any Pool.Default resources then EvictManagedResources
probably wont help any, the resources are managed and the D3D runtime should
remove them from device memory when required. How much memory is on the
graphics card? Is this a windowed app? Are you using triple buffering? Maybe
the number of backbuffers combined with the memory requirement of the
display and size of textures is making the card run out of video memory?
Though that's only a guess.

-- 
n!
homepage: http://www.btinternet.com/~nfactorial/
blog: http://nfactorial.blogspot.com


Relevant Pages

  • Re: losing resources to textures
    ... Dispose is absolutely necessary. ... but has nothing to do with memory leaks. ... > any of the precious resources. ... > how this might be done in my case with textures? ...
    (microsoft.public.win32.programmer.directx.managed)
  • Forms (opening) and memory leaks
    ... I have written an app for a pocketpc in vb.net. ... is that every time i open a new form, resources get used and never ... The following shows the memory usage each time I open a form: ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Forms (opening) and memory leaks
    ... Which version of the Compact Framework are you using? ... >I have written an app for a pocketpc in vb.net. ... > is that every time i open a new form, resources get used and never ... > on the form afterwards but i still seem to lose memory. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: default pool never runs out of memory?
    ... the PCIe analog of AGP mem in that count, but it's not working for me. ... more and more DX resources get created (I don't know when to stop, ... I can adjust the memory footprint of my app, but a good setting seems 512MB ... textures, and this area may be accesible for CPU. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: losing resources to textures
    ... I see the memory wither down from ... any of the precious resources. ... how this might be done in my case with textures? ... > and removing elements from them without starting a new Collection at some ...
    (microsoft.public.win32.programmer.directx.managed)

Quantcast