WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
AllocatorBase.hpp File Reference

This file defines MallocAllocator. More...

#include "wpi/util/Compiler.hpp"
#include "wpi/util/MemAlloc.hpp"
#include <type_traits>

Go to the source code of this file.

Classes

class  wpi::util::AllocatorBase< DerivedT >
 CRTP base class providing obvious overloads for the core Allocate() methods of LLVM-style allocators. More...
class  wpi::util::MallocAllocator
class  wpi::util::detail::AllocatorHolder< Alloc >
class  wpi::util::detail::AllocatorHolder< Alloc & >

Namespaces

namespace  wpi
namespace  wpi::util
namespace  wpi::util::detail
 These are wrappers over isa* function that allow them to be used in generic algorithms such as wpi::util:all_of, wpi::util::none_of, etc.

Macros

#define LLVM_ALLOCATORHOLDER_EMPTYBASE

Detailed Description

This file defines MallocAllocator.

MallocAllocator conforms to the LLVM "Allocator" concept which consists of an Allocate method accepting a size and alignment, and a Deallocate accepting a pointer and size. Further, the LLVM "Allocator" concept has overloads of Allocate and Deallocate for setting size and alignment based on the final type. These overloads are typically provided by a base class template AllocatorBase.

Macro Definition Documentation

◆ LLVM_ALLOCATORHOLDER_EMPTYBASE

#define LLVM_ALLOCATORHOLDER_EMPTYBASE