LLVM  6.0.0svn
Classes | Namespaces | Typedefs | Functions
Allocator.h File Reference

This file defines the MallocAllocator and BumpPtrAllocator interfaces. More...

#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <iterator>
#include <type_traits>
#include <utility>
Include dependency graph for Allocator.h:

Go to the source code of this file.

Classes

class  llvm::AllocatorBase< DerivedT >
 CRTP base class providing obvious overloads for the core Allocate() methods of LLVM-style allocators. More...
 
class  llvm::MallocAllocator
 
class  llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >
 Allocate memory in an ever growing pool, as if by bump-pointer. More...
 
class  llvm::SpecificBumpPtrAllocator< T >
 A BumpPtrAllocator that allows only elements of a specific type to be allocated. More...
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 llvm::detail
 Implementation details of the pass manager interfaces.
 

Typedefs

typedef BumpPtrAllocatorImpl llvm::BumpPtrAllocator
 The standard BumpPtrAllocator which just uses the default template parameters. More...
 

Functions

void llvm::detail::printBumpPtrAllocatorStats (unsigned NumSlabs, size_t BytesAllocated, size_t TotalMemory)
 
template<typename AllocatorT , size_t SlabSize, size_t SizeThreshold>
void * operator new (size_t Size, llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold > &Allocator)
 
template<typename AllocatorT , size_t SlabSize, size_t SizeThreshold>
void operator delete (void *, llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold > &)
 

Detailed Description

This file defines the MallocAllocator and BumpPtrAllocator interfaces.

Both of these conform to an 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.

Definition in file Allocator.h.

Function Documentation

◆ operator delete()

template<typename AllocatorT , size_t SlabSize, size_t SizeThreshold>
void operator delete ( void *  ,
llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold > &   
)

Definition at line 454 of file Allocator.h.

◆ operator new()

template<typename AllocatorT , size_t SlabSize, size_t SizeThreshold>
void* operator new ( size_t  Size,
llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold > &  Allocator 
)