|
tape-kernel 1.0
a modular modern independent kernel
|

Go to the source code of this file.
Functions | |
| void | __hinit (arena_t *arena, void *start, uint32_t size) |
| initializes a central heap rather then child arena | |
| void * | __alc (arena_t *arena, uint32_t size) |
| allocates memory to a heap | |
| void | __res (arena_t *arena) |
| resets a arena or heap by setting current to start and overriding data | |
| arena_t * | __anew (arena_t *parent, uint32_t size) |
| creates a child arena under a central heap | |
allocates memory to a heap
alc is a function that allocates memory from a central heap
| arena,the | ptr to the arena to allocate from |
| size,the | amount to allocate |
using alc is done with
Definition at line 51 of file heap.c.
References assert, arena_t::current, NULL, panic, arena_t::size, and arena_t::start.
creates a child arena under a central heap
anew is a function that makes a child arena under a parent heap
| parent,the | ptr to the parent arena |
| size,the | size of the arena |
using anew is done with
and you can reset this new arena or use it!
initializes a central heap rather then child arena
hinit is a function used to initliaze a new central heap, like kheap
| arena,in | hinit this is the ptr to your heap |
| start,this | should be a buffer like 'static uint8_t mem[HEAP_SIZE]' using the size of your heap |
| size,the | size of the heap using 'sizeof(mem)' |
using hinit is done with
it initializes the heap by making the start and size be your set size but the current heap addr the start
Definition at line 30 of file heap.c.
References arena_t::current, arena_t::size, and arena_t::start.
| void __res | ( | arena_t * | arena | ) |
resets a arena or heap by setting current to start and overriding data
| arena,the | arena or heap to reset |
Definition at line 82 of file heap.c.
References arena_t::current, and arena_t::start.