Why do Pool.Default D3D volume textures take memory from my process?

I am working on a Direct3D rendering application that uses a lot of texture RAM. I notice that if I allocate a Pool.Default volume texture:

   _texture = new VolumeTexture(device, size.Width, size.Height, size.Depth, 1, Usage.None, Format.L16, Pool.Default);


my process's system memory decreases by the same amount I allocate on the video card. I think this is unexpected. This texture is supposed to be video-memory only.

Effectively this means I can not use all texture RAM on high end video cards, I can not afford to lose a whole gigabyte of system RAM. We're short on adress space as it is....

Is there anybody who knows what's happening here? Are there ways to prevent this from happening?

This was seen on Windows 7 64 bit from a 32 bit process, using Directx 9c, with several different nVidia cards. The process is marked as /LARGEADRESSAWARE to make sure we get as much as adress space as possible.

You may have guessed by now that I am not writing a game.... but I assume the Direct3D experts are here to be found.... And I can imagine this issue affects games as much as it affects us...

EDIT:

This appears to happen only with Volume Textures. If I allocate 2D textures of the same size it does not happen. By default my volume textures were 32megabytes each. If I make them smaller (I tried down to 2megabytes each), There are still blocks being allocated. According to VMMap, each texture gets a 32 meg block in my process, flagged as "Read/Write/WriteCombine".

The fact that they are labeled as "WriteCombine" makes me really curious, no other block of memory is labeled like that.

• This is indeed unexpected. I'm curious, are you preloading the texture at a later stage? Or simply using it completely empty? – Michael Kissner Sep 17 '11 at 22:08
• That code appears to be C#; are you using Managed DirectX or SlimDX (and if the former, are you aware that the API is deprecated)? – Josh Sep 17 '11 at 23:34
• Does this only happen with volume textures? – Adam Sep 18 '11 at 0:31
• @josh: oh yeah, i am using slimdx. Should have included that. – jdv-Jan de Vaan Sep 18 '11 at 9:20
• @MichaelKissner: We are allocating blocks in advance in a standard format, and recycle them for different data. The memory pressure increases when I allocate it, and it never goes away. – jdv-Jan de Vaan Sep 18 '11 at 10:14