Skip to content
BitVecMustReserve

BitVecMustReserve

Description

Aborting variant of BitVecReserve. See that function for parameter semantics and success-state effects.

Success

Returns to the caller. The underlying BitVecReserve call succeeded; see BitVecReserve for the post-state.

Failure

Does not return - aborts via LOG_FATAL / Abort when the underlying BitVecReserve call returns false.

Usage example (Cross-references)

Usage examples (Cross-references)
        do {                                                                                                               \
            if (!BitVecReserve((bv), (n))) {                                                                               \
                LOG_FATAL("BitVecMustReserve failed");                                                                     \
            }                                                                                                              \
        } while (0)
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
        BitVecMustReserve(&bv, SIZE_MAX);
    
        // If we reach here, validation didn't work as expected
Last updated on