Tracking down memory leak? 
Author Message
 Tracking down memory leak?

I have recently begun getting a memory leak in my application.  I am pretty
sure its the SQL library I am using that is causing it, but I haven't been
able to figure out WHY.  The memory dump VC does when I exit debug is not
giving me line numbers as it sometimes does.  Any suggestions on how to
track this down?

--
Adam Clauss

Detected memory leaks!
Dumping objects ->
{641} normal block at 0x0169A6A8, 17780 bytes long.
 Data: <     -h tE  ?=w_> 00 00 00 00 98 96 68 01 74 45 00 00 F6 3D 77 5F
{640} normal block at 0x01689698, 69588 bytes long.
 Data: <|i Ph ?   ?=w_> A8 A6 69 01 E8 50 68 01 D4 0F 01 00 F6 3D 77 5F
{639} normal block at 0x016850E8, 17780 bytes long.
 Data: < -h 8 h tE  ?=w_> 98 96 68 01 38 0B 68 01 74 45 00 00 F6 3D 77 5F
{638} normal block at 0x01680B38, 17780 bytes long.
 Data: <Ph e?g tE  ?=w_> E8 50 68 01 F0 F8 67 01 74 45 00 00 F6 3D 77 5F
{635} normal block at 0x0167F8F0, 4620 bytes long.
 Data: <8 h x?g     ?=w_> 38 0B 68 01 78 F8 67 01 0C 12 00 00 F6 3D 77 5F
{634} normal block at 0x0167F878, 56 bytes long.
 Data: <e?g  ?g 8   ?=w_> F0 F8 67 01 00 F8 67 01 38 00 00 00 F6 3D 77 5F
{633} normal block at 0x0167F800, 56 bytes long.
 Data: <x?g  g 8   ?=w_> 78 F8 67 01 88 F7 67 01 38 00 00 00 F6 3D 77 5F
{632} normal block at 0x0167F788, 56 bytes long.

{631} normal block at 0x024F0040, 2113552 bytes long.

{628} normal block at 0x0167F710, 56 bytes long.

{627} normal block at 0x01675310, 41924 bytes long.
 Data: < g Pc ?  ?=w_> 10 F7 67 01 C0 50 63 01 C4 A3 00 00 F6 3D 77 5F
{626} normal block at 0x016350C0, 262672 bytes long.

{625} normal block at 0x01FE0040, 1049104 bytes long.
 Data: <Pc  2a     ?=w_> C0 50 63 01 98 32 61 01 10 02 10 00 F6 3D 77 5F
{624} normal block at 0x01613298, 138732 bytes long.

{623} normal block at 0x01612050, 4620 bytes long.
 Data: < 2a   ]     ?=w_> 98 32 61 01 00 10 5D 01 0C 12 00 00 F6 3D 77 5F
{622} normal block at 0x015D1000, 266256 bytes long.

{621} normal block at 0x017D0040, 8405008 bytes long.

{620} normal block at 0x015D0638, 2444 bytes long.

{619} normal block at 0x015D05D8, 32 bytes long.
 Data: <8 ] ? ]     ?=w_> 38 06 5D 01 F8 03 5D 01 20 00 00 00 F6 3D 77 5F
{618} normal block at 0x015D03F8, 416 bytes long.
 Data: <? ]  ?\     ?=w_> D8 05 5D 01 88 E7 5C 01 A0 01 00 00 F6 3D 77 5F
{617} normal block at 0x015CE788, 7216 bytes long.
 Data: <? ] 0?\ 0   ?=w_> F8 03 5D 01 30 E7 5C 01 30 1C 00 00 F6 3D 77 5F
{616} normal block at 0x015CE730, 24 bytes long.
 Data: < ?\ ?\     ?=w_> 88 E7 5C 01 C0 E6 5C 01 18 00 00 00 F6 3D 77 5F
{615} normal block at 0x015CE6C0, 48 bytes long.
 Data: <0?\ e?\ 0   ?=w_> 30 E7 5C 01 F0 E5 5C 01 30 00 00 00 F6 3D 77 5F
{614} normal block at 0x015CE5F0, 144 bytes long.
 Data: <?\  \     ?=w_> C0 E6 5C 01 A0 DC 5C 01 90 00 00 00 F6 3D 77 5F
{613} normal block at 0x015CDCA0, 2320 bytes long.
 Data: <e?\ H\     ?=w_> F0 E5 5C 01 48 DC 5C 01 10 09 00 00 F6 3D 77 5F
{612} normal block at 0x015CDC48, 24 bytes long.
 Data: < \ ??\     ?=w_> A0 DC 5C 01 D8 DB 5C 01 18 00 00 00 F6 3D 77 5F
{611} normal block at 0x015CDBD8, 48 bytes long.
 Data: <H\ e? 0   ?=w_> 48 DC 5C 01 F0 BD F9 00 30 00 00 00 F6 3D 77 5F
{610} normal block at 0x00F9BDF0, 144 bytes long.
 Data: <??\  \     ?=w_> D8 DB 5C 01 88 D2 5C 01 90 00 00 00 F6 3D 77 5F
{609} normal block at 0x015CD288, 2320 bytes long.
 Data: <e?  ?     ?=w_> F0 BD F9 00 98 BD F9 00 10 09 00 00 F6 3D 77 5F
{608} normal block at 0x00F9BD98, 24 bytes long.
 Data: < \ (?     ?=w_> 88 D2 5C 01 28 BD F9 00 18 00 00 00 F6 3D 77 5F
{607} normal block at 0x00F9BD28, 48 bytes long.
 Data: < ? X? 0   ?=w_> 98 BD F9 00 58 BC F9 00 30 00 00 00 F6 3D 77 5F
{606} normal block at 0x00F9BC58, 144 bytes long.
 Data: <(? 8\     ?=w_> 28 BD F9 00 38 C9 5C 01 90 00 00 00 F6 3D 77 5F
{605} normal block at 0x015CC938, 2320 bytes long.
 Data: <X?  ?     ?=w_> 58 BC F9 00 00 BC F9 00 10 09 00 00 F6 3D 77 5F
{604} normal block at 0x00F9BC00, 24 bytes long.
 Data: <8\  ?     ?=w_> 38 C9 5C 01 90 BB F9 00 18 00 00 00 F6 3D 77 5F
{603} normal block at 0x00F9BB90, 48 bytes long.
 Data: < ? o 0   ?=w_> 00 BC F9 00 C0 BA F9 00 30 00 00 00 F6 3D 77 5F
{602} normal block at 0x00F9BAC0, 144 bytes long.
 Data: < ? ?\     ?=w_> 90 BB F9 00 E8 BF 5C 01 90 00 00 00 F6 3D 77 5F
{601} normal block at 0x015CBFE8, 2320 bytes long.
 Data: <o ho     ?=w_> C0 BA F9 00 68 BA F9 00 10 09 00 00 F6 3D 77 5F
{600} normal block at 0x00F9BA68, 24 bytes long.
 Data: <?\ ?1     ?=w_> E8 BF 5C 01 F8 B9 F9 00 18 00 00 00 F6 3D 77 5F
{599} normal block at 0x00F9B9F8, 48 bytes long.
 Data: <ho  1 0   ?=w_> 68 BA F9 00 A0 B9 F9 00 30 00 00 00 F6 3D 77 5F
{598} normal block at 0x00F9B9A0, 24 bytes long.
 Data: <?1 H1     ?=w_> F8 B9 F9 00 48 B9 F9 00 18 00 00 00 F6 3D 77 5F
{597} normal block at 0x00F9B948, 24 bytes long.
 Data: < 1 e?     ?=w_> A0 B9 F9 00 F0 B8 F9 00 18 00 00 00 F6 3D 77 5F
{596} normal block at 0x00F9B8F0, 24 bytes long.
 Data: <H1  ?     ?=w_> 48 B9 F9 00 98 B8 F9 00 18 00 00 00 F6 3D 77 5F
{595} normal block at 0x00F9B898, 24 bytes long.

{594} normal block at 0x00F9B840, 24 bytes long.
 Data: < ?     ?=w_> 98 B8 F9 00 E8 B7 F9 00 18 00 00 00 F6 3D 77 5F
{593} normal block at 0x00F9B7E8, 24 bytes long.

{592} normal block at 0x00F9B790, 24 bytes long.
 Data: < 8     ?=w_> E8 B7 F9 00 38 B7 F9 00 18 00 00 00 F6 3D 77 5F
{591} normal block at 0x00F9B738, 24 bytes long.
 Data: < ?     ?=w_> 90 B7 F9 00 E0 B6 F9 00 18 00 00 00 F6 3D 77 5F
{590} normal block at 0x00F9B6E0, 24 bytes long.
 Data: <8  ?     ?=w_> 38 B7 F9 00 88 B6 F9 00 18 00 00 00 F6 3D 77 5F
{589} normal block at 0x00F9B688, 24 bytes long.
 Data: <? 0?     ?=w_> E0 B6 F9 00 30 B6 F9 00 18 00 00 00 F6 3D 77 5F
{588} normal block at 0x00F9B630, 24 bytes long.
 Data: < ? ?     ?=w_> 88 B6 F9 00 D8 B5 F9 00 18 00 00 00 F6 3D 77 5F
{587} normal block at 0x00F9B5D8, 24 bytes long.
 Data: <0?       ?=w_> 30 B6 F9 00 80 B5 F9 00 18 00 00 00 F6 3D 77 5F
{586} normal block at 0x00F9B580, 24 bytes long.
 Data: <?  ?     ?=w_> D8 B5 F9 00 80 FF F9 00 18 00 00 00 F6 3D 77 5F
{585} normal block at 0x00F9FF80, 24 bytes long.
 Data: < (?     ?=w_> 80 B5 F9 00 28 FF F9 00 18 00 00 00 F6 3D 77 5F
{584} normal block at 0x00F9FF28, 24 bytes long.
 Data: < ? Dt     ?=w_> 80 FF F9 00 D0 FE F9 00 18 00 00 00 F6 3D 77 5F
{583} normal block at 0x00F9FED0, 24 bytes long.
 Data: <(?  ?\     ?=w_> 28 FF F9 00 98 AC 5C 01 18 00 00 00 F6 3D 77 5F
{582} normal block at 0x015CAC98, 4884 bytes long.

{581} normal block at 0x016C0040, 1048592 bytes long.
 Data: < ?\ H?     ?=w_> 98 AC 5C 01 48 FB F9 00 10 00 10 00 F6 3D 77 5F
{580} normal block at 0x00F9FB48, 840 bytes long.

{579} normal block at 0x00F995F0, 8016 bytes long.
 Data: <H? e P   ?=w_> 48 FB F9 00 F0 FA F9 00 50 1F 00 00 F6 3D 77 5F
{578} normal block at 0x00F9FAF0, 24 bytes long.
 Data: <e. h \     ?=w_> F0 95 F9 00 68 00 5C 01 18 00 00 00 F6 3D 77 5F
{577} normal block at 0x015C0068, 44016 bytes long.
 Data: <e X e?  ?=w_> F0 FA F9 00 58 FA F9 00 F0 AB 00 00 F6 3D 77 5F
{576} normal block at 0x00F9FA58, 88 bytes long.
 Data: <h \  . X   ?=w_> 68 00 5C 01 20 95 F9 00 58 00 00 00 F6 3D 77 5F
{575} normal block at 0x00F99520, 20 bytes long.
 Data: <X D"     ?=w_> 58 FA F9 00 D0 94 F9 00 14 00 00 00 F6 3D 77 5F
{574} normal block at 0x00F994D0, 20 bytes long.
 Data: < .  "     ?=w_> 20 95 F9 00 80 94 F9 00 14 00 00 00 F6 3D 77 5F
{573} normal block at 0x00F99480, 20 bytes long.
 Data: <D" 0"     ?=w_> D0 94 F9 00 30 94 F9 00 14 00 00 00 F6 3D 77 5F
{572} normal block at 0x00F99430, 20 bytes long.
 Data: < "         ?=w_> 80 94 F9 00 00 00 00 00 14 00 00 00 F6 3D 77 5F
{542} normal block at 0x00F97DA0, 64 bytes long.
 Data: <> CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.



Sat, 12 Nov 2005 09:52:33 GMT  
 Tracking down memory leak?
Hi,

Quote:
> {641} normal block at 0x0169A6A8, 17780 bytes long.

the 641 is allocation serial number. You can break into your code at the
time when that allocation is made with _CrtSetBreakAlloc(641). There is one
pitfall. You have to run your application in the "same way" to get the same
allocation number. This is sometimes not easy due to allocations in idle
time.

Jan



Sat, 12 Nov 2005 14:36:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help needed tracking down memory leaks in C/C++

2. Tracking memory leaks and debugging memory problems

3. Help me track down memory leakage

4. Tracking Memory Leaks (summary + code)

5. Tracking memory leaks..

6. ?How to track memory leak?

7. How to track memory leaks?

8. Memory leak tracking

9. Memory leak tracking

10. Tracking memory leaks

11. Tracking memory leaks?

12. track track track to Afxwin.h

 

 
Powered by phpBB® Forum Software