Frees's memory using sdallocx if possible

Synopsis

Declared in <folly/memory/Malloc.h>

void
sizedFree(
    void* ptr,
    size_t size);

Description

The sdallocx function deallocates memory allocated by malloc or memalign. It takes a size parameter to pass the original allocation size. The default weak implementation calls free(), but TCMalloc overrides it and uses the size to improve deallocation performance.

Parameters

Name

Description

ptr

Pointer to the buffer to free

size

Size to free

Created with MrDocs