Free a buffer previously returned by checkedAlignedMalloc.

Synopsis

Declared in <folly/memory/Malloc.h>

void
sizedAlignedFree(
    void* ptr,
    size_t align,
    size_t size);

Description

When jemalloc/tcmalloc is active, uses free_aligned_sized() to pass through the original alignment and size; otherwise falls back to folly::aligned_free() and the alignment and size arguments are unused.

Parameters

Name

Description

ptr

Pointer returned by checkedAlignedMalloc.

align

Alignment originally passed to checkedAlignedMalloc.

size

Size originally passed to checkedAlignedMalloc.

Created with MrDocs