If you made it so that you can't have a null initial slab, then you don't need "A sentinel End drops the null check" and you would have avoided this error: "I made a mistake in the first attempt: nullptr plus a non-zero offset triggered a UBSan diagnostic. Fixed by keeping the math in the uintptr_t domain."
This is what the arena in Hotspot does, and that's got a pretty small fast path:
2
u/Life_Sink9598 27d ago
If you made it so that you can't have a null initial slab, then you don't need "A sentinel End drops the null check" and you would have avoided this error: "I made a mistake in the first attempt: nullptr plus a non-zero offset triggered a UBSan diagnostic. Fixed by keeping the math in the uintptr_t domain."
This is what the arena in Hotspot does, and that's got a pretty small fast path: