picox
0.1
|
#include <picox/allocator/xstack_allocator.h>
関数 | |
static uint8_t * | X__GetBeginOrigin (XStackAllocator *self) |
static bool | X__IsValidRange (XStackAllocator *self, const void *p) |
void * | xsalloc_allocate (XStackAllocator *self, size_t size) |
void | xsalloc_clear (XStackAllocator *self) |
void | xsalloc_init (XStackAllocator *self, void *heap, size_t size, size_t alignment) |
void | xsalloc_rewind (XStackAllocator *self, void *begin, void *end) |
void* xsalloc_allocate | ( | XStackAllocator * | self, |
size_t | size | ||
) |
ヒープからsizeバイトのメモリを切り出して返します
void xsalloc_clear | ( | XStackAllocator * | self | ) |
ヒープを初期状態に戻します
void xsalloc_init | ( | XStackAllocator * | self, |
void * | heap, | ||
size_t | size, | ||
size_t | alignment | ||
) |
メモリブロックを初期化します
heap | スタック管理するメモリ領域 |
size | heap領域のサイズ |
alignment | メモリ確保のアライメント |
void xsalloc_rewind | ( | XStackAllocator * | self, |
void * | begin, | ||
void * | end | ||
) |
begin, endの位置にスタックポインタを移動します