Simplify the complex expression down to what it is on 64-bit systems.
32-bit kernels would allocate 2 at a time. Replace all that with
reallocf which will eliminate a bunch of copies. This should be faster
and simpler on both types of kernels.
Suggested by: jhb@
Sponsored by: Netflix