sd: remove 'ssd' driver support
[unleashed/tickless.git] / usr / src / lib / libsqlite / tool / memleak2.awk
blob51b3a1fa7ac7c44a96852bf59e8fa85dfd494ef6
2 #pragma ident "%Z%%M% %I% %E% SMI"
4 # This AWK script reads the output of testfixture when compiled for memory
5 # debugging. It generates SQL commands that can be fed into an sqlite
6 # instance to determine what memory is never freed. A typical usage would
7 # be as follows:
9 # make -f memleak.mk fulltest 2>mem.out
10 # awk -f ../sqlite/tool/memleak2.awk mem.out | ./sqlite :memory:
12 # The job performed by this script is the same as that done by memleak.awk.
13 # The difference is that this script uses much less memory when the size
14 # of the mem.out file is huge.
16 BEGIN {
17 print "CREATE TABLE mem(loc INTEGER PRIMARY KEY, src);"
19 /[0-9]+ malloc / {
20 print "INSERT INTO mem VALUES(" strtonum($6) ",'" $0 "');"
22 /[0-9]+ realloc / {
23 print "INSERT INTO mem VALUES(" strtonum($10) \
24 ",(SELECT src FROM mem WHERE loc=" strtonum($8) "));"
25 print "DELETE FROM mem WHERE loc=" strtonum($8) ";"
27 /[0-9]+ free / {
28 print "DELETE FROM mem WHERE loc=" strtonum($6) ";"
30 END {
31 print "SELECT src FROM mem;"