Pigweed
 
Loading...
Searching...
No Matches
pw::allocator::internal::GenericBlockResult Class Reference

#include <result.h>

Inheritance diagram for pw::allocator::internal::GenericBlockResult:
pw::allocator::BlockResult< BlockType >

Public Types

enum class  Prev : uint8_t { kUnchanged , kSplitNew , kResizedSmaller , kResizedLarger }
 
enum class  Next : uint8_t { kUnchanged , kSplitNew , kResized , kMerged }
 

Public Member Functions

constexpr Prev prev () const
 
constexpr Next next () const
 
constexpr size_t size () const
 
constexpr bool ok () const
 
constexpr Status status () const
 
constexpr void IgnoreUnlessStrict () const
 

Protected Member Functions

constexpr GenericBlockResult (Status status, Prev prev, Next next, size_t size)
 

Detailed Description

Generic base class for BlockResult.

This class communicates the results and side effects of allocator requests by compactly combining a typical Status with enumerated values describing how a block's previous and next neighboring blocks may have been changed.

Member Function Documentation

◆ IgnoreUnlessStrict()

constexpr void pw::allocator::internal::GenericBlockResult::IgnoreUnlessStrict ( ) const
inlineconstexpr

Asserts the result is not an error if strict validation is enabled, and does nothing otherwise.


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