Flutter Impeller
impeller::DebugAllocatorStats Class Reference

#include <allocator_mtl.h>

Public Member Functions

 DebugAllocatorStats ()
 
 ~DebugAllocatorStats ()
 
void Increment (size_t size)
 Increment the tracked allocation size in bytes. More...
 
void Decrement (size_t size)
 Decrement the tracked allocation size in bytes. More...
 
Bytes GetAllocationSize ()
 Get the current tracked allocation size. More...
 

Detailed Description

Definition at line 16 of file allocator_mtl.h.

Constructor & Destructor Documentation

◆ DebugAllocatorStats()

impeller::DebugAllocatorStats::DebugAllocatorStats ( )
inline

Definition at line 18 of file allocator_mtl.h.

18 {}

◆ ~DebugAllocatorStats()

impeller::DebugAllocatorStats::~DebugAllocatorStats ( )
inline

Definition at line 20 of file allocator_mtl.h.

20 {}

Member Function Documentation

◆ Decrement()

void impeller::DebugAllocatorStats::Decrement ( size_t  size)

Decrement the tracked allocation size in bytes.

Definition at line 52 of file allocator_mtl.mm.

52  {
53  size_.fetch_sub(size, std::memory_order_relaxed);
54 }

◆ GetAllocationSize()

Bytes impeller::DebugAllocatorStats::GetAllocationSize ( )

Get the current tracked allocation size.

Definition at line 56 of file allocator_mtl.mm.

56  {
57  return Bytes{size_.load()};
58 }
AllocationSize< 1u > Bytes

◆ Increment()

void impeller::DebugAllocatorStats::Increment ( size_t  size)

Increment the tracked allocation size in bytes.

Definition at line 48 of file allocator_mtl.mm.

48  {
49  size_.fetch_add(size, std::memory_order_relaxed);
50 }

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