C/C++ API Reference
Loading...
Searching...
No Matches

Oveview

Generate code size reports for allocator implementations.

Classes

struct  pw::allocator::size_report::Foo
 Type used for exercising an allocator. More...
 
struct  pw::allocator::size_report::Bar
 Type used for exercising an allocator. More...
 
struct  pw::allocator::size_report::Baz
 Type used for exercising an allocator. More...
 

Typedefs

using pw::allocator::size_report::BlockType = SmallBlock
 Default block type to use for tests.
 

Functions

ByteSpan pw::allocator::size_report::GetBuffer ()
 Returns a view of a statically allocated array of bytes.
 
int pw::allocator::size_report::SetBaseline (uint32_t mask)
 
template<typename BlockType >
int pw::allocator::size_report::MeasureBlock (uint32_t mask)
 
template<typename BucketType >
int pw::allocator::size_report::MeasureBucket (BucketType &bucket, uint32_t mask)
 
int pw::allocator::size_report::MeasureAllocator (Allocator &allocator, uint32_t mask)
 
int pw::allocator::size_report::MeasureBlockAllocator (BlockAllocator< BlockType > &allocator, uint32_t mask)
 

Function Documentation

◆ MeasureAllocator()

int pw::allocator::size_report::MeasureAllocator ( Allocator allocator,
uint32_t  mask 
)

Exercises an allocator as part of a size report.

Parameters
[in]allocatorThe allocator to exercise.
[in]maskA bitmap that can be passed to PW_BLOAT_COND and PW_BLOAT_EXPR. See those macros for details.

◆ MeasureBlock()

template<typename BlockType >
int pw::allocator::size_report::MeasureBlock ( uint32_t  mask)

Exercises a block implementation as part of a size report.

Template Parameters
BlockTypeThe type of block to create and exercise.
Parameters
[in]maskA bitmap that can be passed to PW_BLOAT_COND and PW_BLOAT_EXPR. See those macros for details.

◆ MeasureBlockAllocator()

int pw::allocator::size_report::MeasureBlockAllocator ( BlockAllocator< BlockType > &  allocator,
uint32_t  mask 
)

Exercises a block allocator as part of a size report.

Parameters
[in]allocatorThe block allocator to exercise.
[in]maskA bitmap that can be passed to PW_BLOAT_COND and PW_BLOAT_EXPR. See those macros for details.

◆ MeasureBucket()

template<typename BucketType >
int pw::allocator::size_report::MeasureBucket ( BucketType &  bucket,
uint32_t  mask 
)

Exercises a bucket as part of a size report.

Template Parameters
BucketTypeThe type of bucket to create and exercise.
Parameters
[in]maskA bitmap that can be passed to PW_BLOAT_COND and PW_BLOAT_EXPR. See those macros for details.

◆ SetBaseline()

int pw::allocator::size_report::SetBaseline ( uint32_t  mask)

Measures the size of common functions and data without any allocators.

Parameters
[in]maskA bitmap that can be passed to PW_BLOAT_COND and PW_BLOAT_EXPR. See those macros for details.