🎉 simple allocator init in the code

This commit is contained in:
2025-09-05 16:48:24 -04:00
parent cd316afdd1
commit b0bd4b27b0
2 changed files with 5 additions and 2 deletions

View File

@@ -18,12 +18,13 @@ arena_init:
mov di, ax
xor eax, eax
mov word [di + ArenaStateStruc_t.mark], eax
mov word [di + ArenaStateStruc_t.mark], ax
mov word [di + ArenaStateStruc_t.end], word (__ARENA_HEAP_START + __ARENA_HEAP_SIZE)
mov word [di + ArenaStateStruc_t.start], __ARENA_HEAP_START
; zero out heap area on init
; void* kmemset_byte(void* dst, uint8_t val, uint16_t len);
; TODO: use word or qword spacing at least to speed this up
mov ax, __ARENA_HEAP_SIZE
push ax ; len
xor ax, ax