Artifact a0a11dd84bf4582acc81c3c61271021ae49b3f15:
- File tool/memleak.awk — part of check-in [bf98cf82a7] at 2000-06-08 13:36:40 on branch trunk — remove all memory leaks (CVS 80) (user: drh size: 410)
# # This script looks for memory leaks by analyzing the output of "sqlite" # when compiled with the MEMORY_DEBUG=2 option. # /^malloc / { mem[$5] = $0 } /^realloc / { mem[$7] = ""; mem[$9] = $0 } /^free / { mem[$5] = ""; } /^string at / { addr = $3 sub("string at " addr " is ","") str[addr] = $0 } END { for(addr in mem){ if( mem[addr]=="" ) continue print mem[addr], str[addr] } }