rewrite bump allocator to fix corner cases, decouple from expand_heap