| Flutter Impeller |

Public Member Functions | List of all members
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 98 of file allocator_mtl.mm.

98 {
99 size_.fetch_sub(size, std::memory_order_relaxed);
100 }

## ◆ GetAllocationSize()

Bytes impeller::DebugAllocatorStats::GetAllocationSize | ( |  | ) |

Get the current tracked allocation size.

Definition at line 102 of file allocator_mtl.mm.

102 {
103 return Bytes{size_.load()};
104 }

## ◆ Increment()

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

Increment the tracked allocation size in bytes.

Definition at line 94 of file allocator_mtl.mm.

94 {
95 size_.fetch_add(size, std::memory_order_relaxed);
96 }

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

- impeller/renderer/backend/metal/allocator_mtl.h
- impeller/renderer/backend/metal/allocator_mtl.mm

impeller::Bytes
AllocationSize< 1u > Bytes
Definition: allocation_size.h:151