Fix InvalidMemoryOperationError in DebugAllocator

This fixes errors which fail unit tests when using DebugAllocator.
I'd probably use `size_t.max` here instead of `0`, because `alloc(0)` could also happen.