LLVM 20.0.0git
Public Member Functions | Friends | List of all members
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 32 of file Memory.h.

Constructor & Destructor Documentation

◆ MemoryBlock() [1/2]

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

Definition at line 34 of file Memory.h.

◆ MemoryBlock() [2/2]

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

Definition at line 35 of file Memory.h.

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 40 of file Memory.h.

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

◆ base()

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

Friends And Related Function Documentation

◆ Memory

friend class Memory
friend

Definition at line 46 of file Memory.h.


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