pub fn mark_first(&mut self, slots: usize) -> (Pointer, usize) {
        // try filling the smallest earliest gap possible.
        if let Some((_size, potential)) = self.free.range(slots..).next() {
            let pointer = *potential.iter().next().unwrap();
            self.mark_smaller(pointer, slots);
            return (Pointer::new(pointer), 0);
        }

        // if the last range is a tail range, try extending it
        if let Some((tail, size)) = self.ranges.iter().rev().next() {
            // copy to please the borrow checker gods
            let (tail, size) = (*tail, *size);
            // this free range goes right up to the end
            if tail.to_usize() + size == self.capacity {
                self.mark(tail);
                let remaining = slots - size;
                self.capacity += remaining;
                return (Pointer::new(tail), remaining)
            }
        }

        let pointer = Pointer::new(PointerIdx::new(self.capacity as u64));
        self.capacity += slots;
        return (pointer, slots);
    }
Returns a pointer and the size to increase the allocation by.
The backing allocation size must be increased according to the returned size.
Do not call `add_free_capacity` with the returned size of this method,
because the allocation is used, not free.
passerine-qualm/src/heap/range_set.rs