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

Contains information about an allocator. More...

#include <wpi/memory/error.hpp>

Public Member Functions

constexpr allocator_info (const char *n, const void *alloc) noexcept
 

Public Attributes

const char * name
 The name of the allocator.
 
const void * allocator
 A pointer representing an allocator.
 

Friends

constexpr bool operator== (const allocator_info &a, const allocator_info &b) noexcept
 
constexpr bool operator!= (const allocator_info &a, const allocator_info &b) noexcept
 

Detailed Description

Contains information about an allocator.

It can be used for logging in the various handler functions.

Constructor & Destructor Documentation

◆ allocator_info()

wpi::memory::allocator_info::allocator_info ( const char * n,
const void * alloc )
inlineconstexprnoexcept
Effects:
Creates it by giving it the name of the allocator and a pointer.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const allocator_info & a,
const allocator_info & b )
friend

◆ operator==

bool operator== ( const allocator_info & a,
const allocator_info & b )
friend
Effects:
Compares two allocator_info objects, they are equal, if the allocator is the same.
Returns:
The result of the comparision.

Member Data Documentation

◆ allocator

const void* wpi::memory::allocator_info::allocator

A pointer representing an allocator.

It does not necessarily point to the beginning of the allocator object, the only guarantee is that different allocator objects result in a different pointer value. For stateless allocators it is sometimes nullptr.

Note
The pointer must not be cast back to any allocator type.

◆ name

const char* wpi::memory::allocator_info::name

The name of the allocator.

It is a NTBS whose lifetime is not managed by this object, it must be stored elsewhere or be a string literal.


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