title: Debugging a .NET web application using DebugDiag/Windbg
body: <p>I am debugging a .NET web application using DebugDiag/Windbg. Windbg says it is a outofMemory and sometimes HeapCorruption. are they both memory leak? or are they different?</p>
  
  <p>I have generated below statistics using !dump -stat.  </p>
  
  <pre><code>65242d0c     5057      1496872 System.Data.DataTable
  7a5e7e3c   103017      1648272 System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry
  04b061e0   115367      2307340 System.Globalization.TokenHashValue
  04b02cc0    41384      2915500 System.Int32[]
  001370d0      864      3434044      Free
  04aeaf9c     1056      3981696 System.DateTime[]
  04b03274     8193      4916640 System.Collections.Hashtable+bucket[]
  65244ff8    46539      6887772 System.Data.DataColumn
  65247840      947      7849684 System.Collections.Generic.Dictionary`2+Entry[[System.Data.DataRow, System.Data],[System.Data.DataRowView, System.Data]][]
  0510c73c     5377     11093004 System.Decimal[]
  6524756c   470137     11283288 System.Data.DataRowView
  65246e44     5683     19363428 System.Data.RBTree`1+Node[[System.Int32, mscorlib]][]
  65245dcc    12841     26850796 System.Data.RBTree`1+Node[[System.Data.DataRow, System.Data]][]
  04b01754      718     27034404 System.Char[]
  04ad42f4    88499     30078640 System.Object[]
  6524508c   595901     38137664 System.Data.DataRow
  04b03594     1580    113347752 System.Byte[]
  04b00b24  4177510    244502408 System.String
  Total 6236336 objects
  </code></pre>
  
  <p>I just checked the Heap using !eeheap –gc, it is showing as below:</p>
  
  <pre><code>    Total LoaderHeap size: 0x226000(2,252,800)bytes
  =======================================
  Number of GC Heaps: 1
  generation 0 starts at 0x2e2ffbc4
  generation 1 starts at 0x2e2a1228
  generation 2 starts at 0x02891000
  ephemeral segment allocation context: none
   segment    begin allocated     size            reserved
  02890000 02891000  0385fb60 0x00fceb60(16,575,328) 0001b000
  149a0000 149a1000  15978d14 0x00fd7d14(16,612,628) 00026000
  15aa0000 15aa1000  16a93fc8 0x00ff2fc8(16,723,912) 00010000
  16f50000 16f51000  17f45010 0x00ff4010(16,728,080) 002d0000
  131a0000 131a1000  1419edec 0x00ffddec(16,768,492) 0000b000
  19f50000 19f51000  1af4c524 0x00ffb524(16,758,052) 00001000
  1cf50000 1cf51000  1df46210 0x00ff5210(16,732,688) 000c0000
  1f010000 1f011000  2000faa0 0x00ffeaa0(16,771,744) 00002000
  231a0000 231a1000  2418e804 0x00fed804(16,701,444) 01000000
  241a0000 241a1000  25192da0 0x00ff1da0(16,719,264) 01000000
  21010000 21011000  2200974c 0x00ff874c(16,746,316) 01190000
  251a0000 251a1000  2617a4c0 0x00fd94c0(16,618,688) 00002000
  2b1a0000 2b1a1000  2c190078 0x00fef078(16,707,704) 01000000
  2a1a0000 2a1a1000  2b192750 0x00ff1750(16,717,648) 01000000
  271a0000 271a1000  2816b5d0 0x00fca5d0(16,557,520) 01000000
  281a0000 281a1000  29192e34 0x00ff1e34(16,719,412) 00fed000
  321a0000 321a1000  3319a878 0x00ff9878(16,750,712) 01000000
  1bf50000 1bf51000  1cf26a0c 0x00fd5a0c(16,603,660) 01000000
  2c1a0000 2c1a1000  2d193fec 0x00ff2fec(16,723,948) 00002000
  1e010000 1e011000  1efda8d0 0x00fc98d0(16,554,192) 00006000
  331a0000 331a1000  3419d264 0x00ffc264(16,761,444) 00002000
  2f1a0000 2f1a1000  3019ade0 0x00ff9de0(16,752,096) 00002000
  311a0000 311a1000  32196010 0x00ff5010(16,732,176) 00005000
  3a1a0000 3a1a1000  3b19f8d8 0x00ffe8d8(16,771,288) 0060a000
  2e1a0000 2e1a1000  2e363bd0 0x001c2bd0(1,846,224) 00712000
  Large object heap starts at 0x03891000
   segment    begin allocated     size            reserved
  03890000 03891000  048741d0 0x00fe31d0(16,658,896) 0001b000
  121a0000 121a1000  13177f70 0x00fd6f70(16,609,136) 00028000
  111a0000 111a1000  12194060 0x00ff3060(16,724,064) 0000b000
  3f1a0000 3f1a1000  40177460 0x00fd6460(16,606,304) 00028000
  391a0000 391a1000  3a1555d0 0x00fb45d0(16,467,408) 0004a000
  3c1a0000 3c1a1000  3d197228 0x00ff6228(16,736,808) 00008000
  3e1a0000 3e1a1000  3f171ee0 0x00fd0ee0(16,584,416) 0002e000
  3d1a0000 3d1a1000  3e192790 0x00ff1790(16,717,712) 0000d000
  381a0000 381a1000  3917d070 0x00fdc070(16,629,872) 00022000
  291a0000 291a1000  2a18c620 0x00feb620(16,692,768) 00013000
  3b1a0000 3b1a1000  3b7a9560 0x00608560(6,325,600) 009f6000
  Total Size  0x224c061c(575,407,644)
  ------------------------------
  GC Heap Size  0x224c061c(575,407,644)
  </code></pre>