Artifact 16ef9493dcd36146f806e75148f4bb0201a123ec:
- File tool/memleak.awk — part of check-in [b957dafc26] at 2002-08-25 18:29:12 on branch trunk — Fix the memory leak introduced by check-in (725). (CVS 726) (user: drh size: 444)
# # This script looks for memory leaks by analyzing the output of "sqlite" # when compiled with the MEMORY_DEBUG=2 option. # /[0-9]+ malloc / { mem[$6] = $0 } /[0-9]+ realloc / { mem[$8] = ""; mem[$10] = $0 } /[0-9]+ free / { mem[$6] = ""; str[$6] = "" } /^string at / { addr = $4 sub("string at " addr " is ","") str[addr] = $0 } END { for(addr in mem){ if( mem[addr]=="" ) continue print mem[addr], str[addr] } }