pub fn is_free(&self, pointer: Pointer, slots: usize) -> bool {
        let pointer: PointerIdx = pointer.to_idx();

        // get the first pointer before or at the one specified.
        if let Some((p, free_range)) = self.ranges.range(..=pointer).rev().next() {
            // check that the free range covers the range of the pointer in question
            let p_end = p.to_usize() + free_range;
            let pointer_end = pointer.to_usize() + slots;

            // for a pointer to be free it must be in the range!
            if p_end >= pointer_end {
                return true;
            }

            // TODO: tail allocations; need to increase the allocation size.
            // || self.free.capacity == p_end
            //     && self.free.capacity < pointer_end
        }

        false
    }
Returns whether a pointer of a given size is free at a given point.
Used to determine whether reallocation in place is possible.
passerine-qualm/src/heap/range_set.rs