llvm::SmallVectorTemplateBase::mallocForGrow

mallocForGrow overloads

Synopses

Declared in <llvm/ADT/SmallVector.h>

Create a new allocation big enough for MinSize and pass back its size in NewCapacity. This is the first section of grow().

T*
mallocForGrow(
    size_t MinSize,
    size_t& NewCapacity);
» more...

This is a helper for grow() that's out of line to reduce code duplication. This function will report a fatal error if it can't grow at least to MinSize.

void*
mallocForGrow(
    void* FirstEl,
    size_t MinSize,
    size_t TSize,
    size_t& NewCapacity);
» more...

Return Value

  • Pointer to the newly allocated element storage.
  • Pointer to the newly allocated storage.

Parameters

NameDescription
MinSizeMinimum number of elements the new allocation must hold.
NewCapacitySet to the capacity of the new allocation.
FirstElPointer to the first element of current storage.
TSizeSize in bytes of each element.