Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Deciphering memory leak dump

Deciphering memory leak dump

Scheduled Pinned Locked Moved C / C++ / MFC
helpperformancequestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paulb
    wrote on last edited by
    #1

    I'm getting this object dump from a memory leak.... Detected memory leaks! Dumping objects -> {75} normal block at 0x00335668, 8 bytes long. Data: < > 01 00 00 00 02 00 00 00 {74} normal block at 0x00335600, 40 bytes long. Data: < B hV3 > A0 EE 42 00 C4 FD 12 00 68 56 33 00 02 00 00 00 {73} normal block at 0x003355B0, 16 bytes long. Data: < B 8 V3 > 14 EF 42 00 02 00 00 00 38 FE 12 00 00 56 33 00 {70} normal block at 0x003353A0, 380 bytes long. Data: 44 67 04 10 1C 67 04 10 B0 55 33 00 01 00 00 00 Object dump complete. Is there any information in here that will help me track down the problem? it all looks like gobbledygook to me.

    P X E 3 Replies Last reply
    0
    • P paulb

      I'm getting this object dump from a memory leak.... Detected memory leaks! Dumping objects -> {75} normal block at 0x00335668, 8 bytes long. Data: < > 01 00 00 00 02 00 00 00 {74} normal block at 0x00335600, 40 bytes long. Data: < B hV3 > A0 EE 42 00 C4 FD 12 00 68 56 33 00 02 00 00 00 {73} normal block at 0x003355B0, 16 bytes long. Data: < B 8 V3 > 14 EF 42 00 02 00 00 00 38 FE 12 00 00 56 33 00 {70} normal block at 0x003353A0, 380 bytes long. Data: 44 67 04 10 1C 67 04 10 B0 55 33 00 01 00 00 00 Object dump complete. Is there any information in here that will help me track down the problem? it all looks like gobbledygook to me.

      P Offline
      P Offline
      peterchen
      wrote on last edited by
      #2

      a) compile with (more) debug info, if possible b) start at bottom, the later allocations might be dependent on the bottom one. c) does the size of the structure ring a bell? b) the first number is the "allocation number" (i.e. the 70th allocation leaks memory) Typically they are "stable". If so, you can use _CrtSetAllocHook, which gets called for each allocation, set a cond breakpoint for allocation number == 70, and look at the stack trace from there.


      "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
      sighist | Agile Programming | doxygen

      K 1 Reply Last reply
      0
      • P paulb

        I'm getting this object dump from a memory leak.... Detected memory leaks! Dumping objects -> {75} normal block at 0x00335668, 8 bytes long. Data: < > 01 00 00 00 02 00 00 00 {74} normal block at 0x00335600, 40 bytes long. Data: < B hV3 > A0 EE 42 00 C4 FD 12 00 68 56 33 00 02 00 00 00 {73} normal block at 0x003355B0, 16 bytes long. Data: < B 8 V3 > 14 EF 42 00 02 00 00 00 38 FE 12 00 00 56 33 00 {70} normal block at 0x003353A0, 380 bytes long. Data: 44 67 04 10 1C 67 04 10 B0 55 33 00 01 00 00 00 Object dump complete. Is there any information in here that will help me track down the problem? it all looks like gobbledygook to me.

        X Offline
        X Offline
        Xander80
        wrote on last edited by
        #3

        I use: #define _CRTDBG_MAP_ALLOC #include at the top of my application, and: _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); at the start of my application (first function). More information about the object that caused the memory leak will appear in the debug information.

        1 Reply Last reply
        0
        • P peterchen

          a) compile with (more) debug info, if possible b) start at bottom, the later allocations might be dependent on the bottom one. c) does the size of the structure ring a bell? b) the first number is the "allocation number" (i.e. the 70th allocation leaks memory) Typically they are "stable". If so, you can use _CrtSetAllocHook, which gets called for each allocation, set a cond breakpoint for allocation number == 70, and look at the stack trace from there.


          "Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
          sighist | Agile Programming | doxygen

          K Offline
          K Offline
          KaRl
          wrote on last edited by
          #4

          peterchen wrote: If so, you can use _CrtSetAllocHook, which gets called for each allocation, set a cond breakpoint for allocation number == 70, and look at the stack trace from there. You can do it one step using _CrtSetBreakAlloc(70) at the beginning of the program.


          We do not inherit the Earth from our ancestors, we borrow it from our children - Antoine de Saint-Exupéry (1900-1944)

          1 Reply Last reply
          0
          • P paulb

            I'm getting this object dump from a memory leak.... Detected memory leaks! Dumping objects -> {75} normal block at 0x00335668, 8 bytes long. Data: < > 01 00 00 00 02 00 00 00 {74} normal block at 0x00335600, 40 bytes long. Data: < B hV3 > A0 EE 42 00 C4 FD 12 00 68 56 33 00 02 00 00 00 {73} normal block at 0x003355B0, 16 bytes long. Data: < B 8 V3 > 14 EF 42 00 02 00 00 00 38 FE 12 00 00 56 33 00 {70} normal block at 0x003353A0, 380 bytes long. Data: 44 67 04 10 1C 67 04 10 B0 55 33 00 01 00 00 00 Object dump complete. Is there any information in here that will help me track down the problem? it all looks like gobbledygook to me.

            E Offline
            E Offline
            ed welch
            wrote on last edited by
            #5

            Yes, I notice that the VC6 dump tells you which object caused the leak and VC7 doesn't :( _CrtSetDbgFlag doesn't make any difference.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups