Memory leak from Immediate Context calls

I’ve found two device context calls that seem to leak memory. ID3D11DeviceContext::CopySubresourceRegion and ID3D11DeviceContext::GenerateMips. When I call either of these methods, I get 160 bytes of memory leaked.

The leaked memory always looks like this:

58 04 20 20 00 00 20 38 00 08 40 38 40 00 20 38  X.  .. 8..@8@. 8 
40 00 20 38 40 00 20 38 40 00 20 38 40 00 20 38  @. 8@. 8@. 8@. 8 
40 00 20 38 40 00 20 38 40 00 20 38 40 00 20 38  @. 8@. 8@. 8@. 8 
40 00 20 38 40 00 20 38 40 00 20 38 40 00 20 38  @. 8@. 8@. 8@. 8 
40 00 20 38 40 00 20 38 40 00 20 38 40 00 20 38  @. 8@. 8@. 8@. 8 
40 00 20 38 40 00 20 38 40 00 20 38 40 00 20 38  @. 8@. 8@. 8@. 8 
40 00 20 38 40 00 20 38 40 00 20 38 40 00 20 38  @. 8@. 8@. 8@. 8 
40 00 20 38 40 00 20 38 40 00 20 38 40 00 20 38  @. 8@. 8@. 8@. 8 
40 00 20 38 20 06 00 80 00 00 00 00 00 00 00 00  @. 8 ..€........ 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

It’s 160 bytes and I think the memory is on the heap, because it fills up contiguously for a while then jumps to a different free address (previously unallocated) and keeps filling up.

It gets written when I step over either the CopySubresourceRegion or GenerateMips call. I can see the exact write using a data breakpoint, but the call stack shows that it’s in an nvidia dll.

>   nvwgf2um.dll!09ad857c()      
    [Frames below may be incorrect and/or missing, no symbols loaded for nvwgf2um.dll]   
    nvwgf2um.dll!095e50fa()      
    nvwgf2um.dll!0979cca8()      
    nvwgf2um.dll!0979254b()      
    nvwgf2um.dll!097b0884()      
    nvwgf2um.dll!09ba5a1c()      
    nvwgf2um.dll!09ad546e()      
    nvwgf2um.dll!097830fc()      
    nvwgf2um.dll!0968eb17()      
    d3d11.dll!5ced1167()     
    d3d11_1sdklayers.dll!500dfa17()

The load details for nvwgf2um.dll and d3d11.dll are as follows:

nvwgf2um.dll
C:\Windows\SysWOW64\nvwgf2um.dll
9.18.13.1106
1/18/2013 8:52 AM
094D0000-0A0DA000*

d3d11.dll
C:\Windows\SysWOW64\d3d11.dll
6.2.9200.16492 (win8_gdr_oobssr.130113-0015)
1/13/2013 4:08 PM
5CE40000-5CFB5000

I’m running on Windows 7 Professional with a Geforce GTX 660.

I’m not sure how to make sense of this. So my questions are as follows:

  1. Why would CopySubresourceRegion or GenerateMips leak memory like this?
  2. Does the memory look recognizable as anything? Can you tell what it means from its contents?
  3. Can anyone determine based on the offsets and dll versions what the call stack means?
  4. What can I do to try to figure out why this leaks?