dan | 961ff45 | 2010-06-03 18:20:19 +0000 | [diff] [blame] | 1 | # 2010 June 03 |
| 2 | # |
| 3 | # The author disclaims copyright to this source code. In place of |
| 4 | # a legal notice, here is a blessing: |
| 5 | # |
| 6 | # May you do good and not evil. |
| 7 | # May you find forgiveness for yourself and forgive others. |
| 8 | # May you share freely, never taking more than you give. |
| 9 | # |
| 10 | #*********************************************************************** |
| 11 | # |
| 12 | # This file contains common code used by many different malloc tests |
| 13 | # within the test suite. |
| 14 | # |
| 15 | |
| 16 | proc wal_file_size {nFrame pgsz} { |
| 17 | expr {24 + ($pgsz+24)*$nFrame} |
| 18 | } |
| 19 | |
| 20 | proc wal_frame_count {zFile pgsz} { |
| 21 | set f [file size $zFile] |
| 22 | expr {($f - 24) / ($pgsz+24)} |
| 23 | } |
| 24 | |
| 25 | |
| 26 | |