litert:: Mallocator
#include <litert_buffer_ref.h>
Defines allocation and deallocation behavior for owning buffer refs.
Summary
An allocator is a trivially constructible/destructible object that overrides operator() for allocating and freeing memory. A memory allocator based on malloc and free.
| Details | |||
|---|---|---|---|
| Template Parameters |
|
Public functions |
|
|---|---|
operator()(ByteT *d)
|
void
Frees the given memory block.
|
operator()(size_t bytes)
|
ByteT *
Allocates a memory block of the specified size.
|
Public functions
operator()
void litert::Mallocator::operator()( ByteT *d )
Frees the given memory block.
operator()
ByteT * litert::Mallocator::operator()( size_t bytes )
Allocates a memory block of the specified size.
| Details | |||
|---|---|---|---|
| Parameters |
|
||
| Returns |
A pointer to the allocated memory.
|