#include <stdlib.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
int as_memtracker_destroy |
( |
as_memtracker * |
memtracker) | |
|
Release resources associated with the memtracker. Calls memtracker->destroy. If success and if this is a heap allocated memtracker, then it will be freed.
as_memtracker* as_memtracker_init |
( |
as_memtracker * |
memtracker, |
|
|
void * |
source, |
|
|
const as_memtracker_hooks * |
hooks |
|
) |
| |
Initialize a stack allocated memtracker
as_memtracker* as_memtracker_new |
( |
void * |
source, |
|
|
const as_memtracker_hooks * |
hooks |
|
) |
| |
Heap allocate and initialize a memtracker
bool as_memtracker_release |
( |
const as_memtracker * |
memtracker, |
|
|
const uint32_t |
num_bytes |
|
) |
| |
Release num_bytes bytes of memory
bool as_memtracker_reserve |
( |
const as_memtracker * |
memtracker, |
|
|
const uint32_t |
num_bytes |
|
) |
| |
Reserve num_bytes bytes of memory
bool as_memtracker_reset |
( |
const as_memtracker * |
memtracker) | |
|
Release the entire reservation for the current thread
static void* as_memtracker_source |
( |
const as_memtracker * |
mt) | |
|
|
inlinestatic |