A reasonable malloc implementation with manage 2^N sized blocks, so I think `j * 2 + 16` will be suboptimal in many cases. How about `max(16, nextpow2(j))` instead?