proxygen
Malloc.h File Reference
#include <folly/CPortability.h>
#include <folly/portability/Config.h>
#include <folly/lang/Exception.h>
#include <folly/memory/detail/MallocImpl.h>
#include <stdlib.h>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <atomic>
#include <new>

Go to the source code of this file.

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 

Macros

#define MALLOCX_LG_ALIGN(la)   (la)
 
#define MALLOCX_ZERO   (static_cast<int>(0x40))
 
#define FOLLY_MALLOC_NOINLINE
 
#define FOLLY_MALLOC_CHECKED_MALLOC
 

Functions

bool folly::usingJEMalloc () noexcept
 
size_t folly::goodMallocSize (size_t minSize) noexcept
 
void * folly::checkedMalloc (size_t size)
 
void * folly::checkedCalloc (size_t n, size_t size)
 
void * folly::checkedRealloc (void *ptr, size_t size)
 
void * folly::smartRealloc (void *p, const size_t currentSize, const size_t currentCapacity, const size_t newCapacity)
 

Variables

static const size_t folly::jemallocMinInPlaceExpandable = 4096
 

Macro Definition Documentation

#define FOLLY_MALLOC_CHECKED_MALLOC

Definition at line 136 of file Malloc.h.

#define MALLOCX_LG_ALIGN (   la)    (la)

Define various MALLOCX_* macros normally provided by jemalloc. We define them so that we don't have to include jemalloc.h, in case the program is built without jemalloc support.

Definition at line 35 of file Malloc.h.

#define MALLOCX_ZERO   (static_cast<int>(0x40))

Definition at line 38 of file Malloc.h.

Referenced by folly::threadlocal_detail::StaticMetaBase::reallocate().