llvm::deallocate_buffer

Deallocate a buffer of memory with the given size and alignment.

Synopsis

Declared in <llvm/Support/MemAlloc.h>

void
deallocate_buffer(
    void* Ptr,
    size_t Size,
    size_t Alignment);

Description

If supported, this will used the sized delete operator. Also if supported, this will pass the alignment to the delete operator.

The pointer must have been allocated with the corresponding new operator, most likely using the above helper.

Parameters

NameDescription
PtrMemory previously returned by allocate_buffer.
SizeSize in bytes of the allocation being freed.
AlignmentAlignment of the allocation being freed.