Jump to content
  • Advertisement
Sign in to follow this  

Quick question on debug output

This topic is 4425 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!