diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-28 16:20:17 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-28 16:20:17 -0400 |
commit | c92305221770bb1316d026c200d569ca4e930e42 (patch) | |
tree | bf3e496991e74bd6f2415cf156a7226729f0058b /lib/libjove/heap/heap.h | |
parent | 69f2ee15025ccedaae0308c50b7d0d400b854c5b (diff) | |
download | jove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.gz jove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.bz2 jove-os-c92305221770bb1316d026c200d569ca4e930e42.zip |
merge libc files, new init methods for libjove
Diffstat (limited to 'lib/libjove/heap/heap.h')
-rw-r--r-- | lib/libjove/heap/heap.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/libjove/heap/heap.h b/lib/libjove/heap/heap.h new file mode 100644 index 0000000..8a02655 --- /dev/null +++ b/lib/libjove/heap/heap.h @@ -0,0 +1,19 @@ +#ifndef _LIBC_JOVE_HEAP_H +#define _LIBC_JOVE_HEAP_H 1 + +#include <stdint.h> +#include <stddef.h> + +#define LIBC_HEAP_INIT_SIZE (0x1000) +#define LIBC_HEAP_MINALLOC (0x10) +#define LIBC_HEAP_MINSPLIT (sizeof(heap_bin_t) + sizeof(uintptr_t) + LIBC_HEAP_MINALLOC) + +typedef struct heap_bin { + struct heap_bin *next; + size_t size_taken; + char data[]; +} heap_bin_t; + +void __libjove_heap_init(uintptr_t program_end); + +#endif |