LLVM 19.0.0git
Public Member Functions | List of all members
llvm::MallocAllocator Class Reference

#include "llvm/Support/AllocatorBase.h"

Inheritance diagram for llvm::MallocAllocator:
Inheritance graph
[legend]

Public Member Functions

void Reset ()
 
LLVM_ATTRIBUTE_RETURNS_NONNULL void * Allocate (size_t Size, size_t Alignment)
 
void Deallocate (const void *Ptr, size_t Size, size_t Alignment)
 
void PrintStats () const
 
- Public Member Functions inherited from llvm::AllocatorBase< MallocAllocator >
void * Allocate (size_t Size, size_t Alignment)
 Allocate Size bytes of Alignment aligned memory.
 
TAllocate (size_t Num=1)
 Allocate space for a sequence of objects without constructing them.
 
void Deallocate (const void *Ptr, size_t Size, size_t Alignment)
 Deallocate Ptr to Size bytes of memory allocated by this allocator.
 
std::enable_if_t<!std::is_same_v< std::remove_cv_t< T >, void >, void > Deallocate (T *Ptr, size_t Num=1)
 Deallocate space for a sequence of objects without constructing them.
 

Detailed Description

Definition at line 87 of file AllocatorBase.h.

Member Function Documentation

◆ Allocate()

LLVM_ATTRIBUTE_RETURNS_NONNULL void * llvm::MallocAllocator::Allocate ( size_t  Size,
size_t  Alignment 
)
inline

Definition at line 91 of file AllocatorBase.h.

References llvm::allocate_buffer(), and Size.

◆ Deallocate()

void llvm::MallocAllocator::Deallocate ( const void *  Ptr,
size_t  Size,
size_t  Alignment 
)
inline

Definition at line 98 of file AllocatorBase.h.

References llvm::deallocate_buffer(), Ptr, and Size.

◆ PrintStats()

void llvm::MallocAllocator::PrintStats ( ) const
inline

Definition at line 105 of file AllocatorBase.h.

◆ Reset()

void llvm::MallocAllocator::Reset ( )
inline

Definition at line 89 of file AllocatorBase.h.


The documentation for this class was generated from the following file: