Skip to content
BitVecMustReserve

BitVecMustReserve

Description

Aborting variant of BitVecReserve. Calls LOG_FATAL on allocation failure.

Parameters

Name Direction Description
bv in,out Bitvector to grow.
n in Number of bits to reserve space for.

Success

Returns to the caller.

Failure

Does not return - aborts via LOG_FATAL / SysAbort.

Usage example (Cross-references)

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