Use the maxpagesize, not the allocsize, and be consistent with use of
the variables (no change, but hopefully easier to understand the next
time I read through it).