proxygen
Memory.h File Reference
#include <cassert>
#include <cerrno>
#include <cstddef>
#include <cstdlib>
#include <exception>
#include <limits>
#include <memory>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <folly/ConstexprMath.h>
#include <folly/Likely.h>
#include <folly/Traits.h>
#include <folly/functional/Invoke.h>
#include <folly/lang/Align.h>
#include <folly/lang/Exception.h>
#include <folly/portability/Config.h>
#include <folly/portability/Malloc.h>

Go to the source code of this file.

Classes

struct  folly::static_function_deleter< T, f >
 
struct  folly::detail::lift_void_to_char< T >
 
struct  folly::detail::lift_void_to_char< void >
 
class  folly::SysAllocator< T >
 
class  folly::DefaultAlign
 
class  folly::FixedAlign< Align >
 
class  folly::AlignedSysAllocator< T, Align >
 
class  folly::CxxAllocatorAdaptor< T, Inner >
 
class  folly::allocator_delete< Alloc >
 
struct  folly::SysBufferDeleter
 
struct  folly::AllocatorHasTrivialDeallocate< Alloc >
 
struct  folly::AllocatorHasTrivialDeallocate< CxxAllocatorAdaptor< T, Alloc > >
 
struct  folly::detail::AllocatorCustomizesConstruct_< Void, Alloc, Args >
 
struct  folly::detail::AllocatorCustomizesConstruct_< void_t< typename Alloc::folly_has_default_object_construct >, Alloc, Args... >
 
struct  folly::detail::AllocatorCustomizesDestroy_< Void, Alloc, Args >
 
struct  folly::detail::AllocatorCustomizesDestroy_< void_t< typename Alloc::folly_has_default_object_destroy >, Alloc, Args... >
 
struct  folly::AllocatorHasDefaultObjectConstruct< Alloc, T, Args >
 
struct  folly::AllocatorHasDefaultObjectConstruct< std::allocator< Value >, T, Args... >
 
struct  folly::AllocatorHasDefaultObjectDestroy< Alloc, T >
 
struct  folly::AllocatorHasDefaultObjectDestroy< std::allocator< Value >, T >
 

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 
 folly::detail
 

Typedefs

using folly::SysBufferUniquePtr = std::unique_ptr< void, SysBufferDeleter >
 

Functions

void * folly::allocateBytes (size_t n)
 
void folly::deallocateBytes (void *p, size_t n)
 
void * folly::aligned_malloc (size_t size, size_t align)
 
void folly::aligned_free (void *aligned_ptr)
 
template<typename Alloc , size_t kAlign, bool kAllocate>
void folly::detail::rawOverAlignedImpl (Alloc const &alloc, size_t n, void *&raw)
 
template<typename Alloc , size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)>
std::allocator_traits< Alloc >::pointer folly::allocateOverAligned (Alloc const &alloc, size_t n)
 
template<typename Alloc , size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)>
void folly::deallocateOverAligned (Alloc const &alloc, typename std::allocator_traits< Alloc >::pointer ptr, size_t n)
 
template<typename Alloc , size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)>
size_t folly::allocationBytesForOverAligned (size_t n)
 
template<typename T , typename... Args>
std::enable_if<!std::is_array< T >::value, std::unique_ptr< T > >::type folly::make_unique (Args &&...args)
 
template<typename T >
std::enable_if< std::is_array< T >::value, std::unique_ptr< T > >::type folly::make_unique (const size_t n)
 
template<typename T , typename... Args>
std::enable_if< std::extent< T >::value!=0, std::unique_ptr< T > >::type folly::make_unique (Args &&...)=delete
 
template<typename T , typename D >
std::shared_ptr< Tfolly::to_shared_ptr (std::unique_ptr< T, D > &&ptr)
 
template<typename T >
std::weak_ptr< Tfolly::to_weak_ptr (const std::shared_ptr< T > &ptr)
 
template<typename T , typename Alloc , typename... Args>
std::unique_ptr< T, allocator_delete< Alloc > > folly::allocate_unique (Alloc const &alloc, Args &&...args)
 
SysBufferUniquePtr folly::allocate_sys_buffer (std::size_t size)
 
 folly::detail::FOLLY_CREATE_MEMBER_INVOKE_TRAITS (AllocatorConstruct_, construct)
 
 folly::detail::FOLLY_CREATE_MEMBER_INVOKE_TRAITS (AllocatorDestroy_, destroy)