WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
wpi::memory::memory_block Struct Reference

A memory block. More...

#include <wpi/memory/memory_arena.hpp>

Public Member Functions

 memory_block () noexcept
 
 memory_block (void *mem, std::size_t s) noexcept
 
 memory_block (void *begin, void *end) noexcept
 
bool contains (const void *address) const noexcept
 

Public Attributes

void * memory
 The address of the memory block (might be nullptr).
 
std::size_t size
 The size of the memory block (might be 0).
 

Detailed Description

A memory block.

It is defined by its starting address and size.

Constructor & Destructor Documentation

◆ memory_block() [1/3]

wpi::memory::memory_block::memory_block ( )
inlinenoexcept
Effects:
Creates an invalid memory block with starting address nullptr and size 0.

◆ memory_block() [2/3]

wpi::memory::memory_block::memory_block ( void * mem,
std::size_t s )
inlinenoexcept
Effects:
Creates a memory block from a given starting address and size.

◆ memory_block() [3/3]

wpi::memory::memory_block::memory_block ( void * begin,
void * end )
inlinenoexcept
Effects:
Creates a memory block from a [begin,end) range.

Member Function Documentation

◆ contains()

bool wpi::memory::memory_block::contains ( const void * address) const
inlinenoexcept
Returns:
Whether or not a pointer is inside the memory.

Member Data Documentation

◆ memory

void* wpi::memory::memory_block::memory

The address of the memory block (might be nullptr).

◆ size

std::size_t wpi::memory::memory_block::size

The size of the memory block (might be 0).


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