MemArena: Merge the initialization code with the size calculation code

To make mistakes like in the previous commit less prevalent in the future.