LLVM 22.0.0git
llvm::sys::MemoryBlock Class Reference

This class encapsulates the notion of a memory block which has an address and a size. More...

#include "llvm/Support/Memory.h"

Public Member Functions

 MemoryBlock ()
 MemoryBlock (void *addr, size_t allocatedSize)
void * base () const
size_t allocatedSize () const
 The size as it was allocated.

Friends

class Memory

Detailed Description

This class encapsulates the notion of a memory block which has an address and a size.

It is used by the Memory class (a friend) as the result of various memory allocation operations.

See also
Memory Memory block abstraction.

Definition at line 33 of file Memory.h.

Constructor & Destructor Documentation

◆ MemoryBlock() [1/2]

llvm::sys::MemoryBlock::MemoryBlock ( )
inline

Definition at line 35 of file Memory.h.

◆ MemoryBlock() [2/2]

llvm::sys::MemoryBlock::MemoryBlock ( void * addr,
size_t allocatedSize )
inline

Definition at line 36 of file Memory.h.

References allocatedSize().

Member Function Documentation

◆ allocatedSize()

size_t llvm::sys::MemoryBlock::allocatedSize ( ) const
inline

The size as it was allocated.

This is always greater or equal to the size that was originally requested.

Definition at line 41 of file Memory.h.

Referenced by llvm::jitlink::InProcessMemoryManager::allocate(), MemoryBlock(), llvm::sys::operator<<(), and llvm::trimBlockToPageSize().

◆ base()

void * llvm::sys::MemoryBlock::base ( ) const
inline

◆ Memory

friend class Memory
friend

Definition at line 47 of file Memory.h.

References Memory.

Referenced by Memory.


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