Some leaf helpers and buffer cache resize function.