From 4e6622d16e9cc0c5ff8400c9f4570770794fa022 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 29 Jul 2022 00:17:52 +0200 Subject: [PATCH] alloc: no need from slab >= PAGE_SiZE --- core/alloc.c | 1 - core/alloc.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/alloc.c b/core/alloc.c index 69db5ba..7feb929 100644 --- a/core/alloc.c +++ b/core/alloc.c @@ -38,7 +38,6 @@ static struct { {256, 2 * PAGE_SIZE, 0, 0}, {1024, 2 * PAGE_SIZE, 0, 0}, {2048, 3 * PAGE_SIZE, 0, 0}, - {4096, 4 * PAGE_SIZE, 0, 0}, {0, 0, 0, 0}}; int allocSetup(size_t sizeOfArea, vaddr_t *areaAddr, vaddr_t *descAddr, vaddr_t *entryAddr) diff --git a/core/alloc.h b/core/alloc.h index df6171f..d64b528 100644 --- a/core/alloc.h +++ b/core/alloc.h @@ -23,7 +23,7 @@ void free(void *ptr); struct slabEntry { vaddr_t page; void *freeEl; - size_t size; + size_t size;//of the allocated page bool_t full;//TODO replace by freeEl == NULL struct slabEntry *next; struct slabEntry *prev;