Simplify memory manager

This commit is contained in:
Justine Tunney 2024-07-04 10:52:16 -07:00
parent 5a9a08d1cf
commit 01587de761
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
40 changed files with 451 additions and 311 deletions

View file

@ -16,7 +16,6 @@
#include "libc/assert.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/intrin/kprintf.h"
#include "libc/mem/mem.h"
#include "libc/stdalign.internal.h"
#include "libc/stdckdint.h"
@ -44,8 +43,6 @@ static void tinymalloc_init(void) {
align = TINYMALLOC_MAX_ALIGN;
heap.memory = (char *)(((uintptr_t)heap.bits + align - 1) & -align);
heap.size = sizeof(heap.bits) - (heap.memory - heap.bits);
kprintf("heap.memory = %p\n", heap.memory);
kprintf("heap.size = %p\n", heap.size);
heap.once = 1;
}