Quick question on debug output

Started by
1 comment, last by CCF 17 years, 6 months ago
Hi, My DirectX app is having a bit of memory leak, and I'm just wondering what does the "Alloc count = 129" in the output means? I did some search but couldn't find anything about it. Does it mean that I've 129 allocated items that aren't freed on exit? (but it only listed 11 memory addresses that's having problem?) Thanks!

Direct3D9: (INFO) :MemFini!
Direct3D9: (ERROR) :Memory still allocated!  Alloc count = 129
Direct3D9: (ERROR) :Current Process (pid) = 000005b8
Direct3D9: (ERROR) :Memory Address: 00c442bc lAllocID=1 dwSize=000047f8, ReturnAddr=00d734c8 (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c4a37c lAllocID=9 dwSize=00000af8, ReturnAddr=00d6c2cb (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c42f7c lAllocID=10 dwSize=00000008, ReturnAddr=00d6c36b (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c4aeb4 lAllocID=11 dwSize=00000e20, ReturnAddr=00d71741 (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c42e9c lAllocID=12 dwSize=00000044, ReturnAddr=00d734c8 (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c4bd0c lAllocID=13 dwSize=00000050, ReturnAddr=00d734c8 (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c48d8c lAllocID=22 dwSize=000006bc, ReturnAddr=00d7f3b3 (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c49484 lAllocID=24 dwSize=00000ec4, ReturnAddr=00d745bd (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c42f14 lAllocID=26 dwSize=00000008, ReturnAddr=00d746ee (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c4bd94 lAllocID=28 dwSize=00003508, ReturnAddr=00d734c8 (pid=000005b8)
Direct3D9: (ERROR) :Memory Address: 00c4f2dc lAllocID=29 dwSize=00000198, ReturnAddr=00d734c8 (pid=000005b8)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 44500 bytes
Advertisement
Some allocations get an AllocID, which is an internal number to identify them. The alloc count specifies how many AllocIDs were still unreleased when you released the device. This doesn't have to mean you have 129 missing Release() calls, only that DX had 129 unreleased items internally. This might well be just one missing Release() call that would've released all 129 of these items.

The easiest way I've found to identify where you're leaking memory is the use the "Break on AllocID" option in the DirectX Control panel app. What this does is it has DX break when the item with the AllocID is created. You find out which you want to break at by looking at the unreleased AllocIDs in the previous run.

Hope this helps.
Sirob Yes.» - status: Work-O-Rama.
Thanks! [smile]

This topic is closed to new replies.

Advertisement