blob: cbea99949a335100b55cdb5509af685c6f7f457e [file] [log] [blame]
dan961ff452010-06-03 18:20:19 +00001# 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
16proc wal_file_size {nFrame pgsz} {
17 expr {24 + ($pgsz+24)*$nFrame}
18}
19
20proc wal_frame_count {zFile pgsz} {
21 set f [file size $zFile]
22 expr {($f - 24) / ($pgsz+24)}
23}
24
25
26