tdb2: only adjust size once when growing
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 17 Nov 2010 09:52:19 +0000 (20:22 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 17 Nov 2010 09:52:19 +0000 (20:22 +1030)
commite984ef661368582f7b6e7a8d2a2d709356ac7963
treee169264a086a5a955da70d979baa02702eadddfc
parentd1383862ad9a74e713dc915d351b74da4db35078
tdb2: only adjust size once when growing

We were adding 50% to datalen twice, so move it out of adjust_size and
make the callers do it.

We also add a test that the heuristic is working at all.
ccan/tdb2/free.c
ccan/tdb2/test/run-15-append.c