From d1a45cf8e07858ce5ad611594834c2be4f9271cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 21 Apr 2026 22:53:07 +0200 Subject: [PATCH] Comments --- include/ucore/slot_allocator.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/ucore/slot_allocator.h b/include/ucore/slot_allocator.h index 55d4eb9..417df05 100644 --- a/include/ucore/slot_allocator.h +++ b/include/ucore/slot_allocator.h @@ -4,7 +4,7 @@ #include #include -// Repurpose free memory to eep a linked list of free slots +//Free memory is reused to build a linked list of slots typedef struct UCSlot UCSlot; struct UCSlot { UCSlot *next; @@ -66,6 +66,9 @@ static inline void *uc_slot_alloc(UCSlotArena *arena) if (slot != NULL) { arena->free_list = slot->next; arena->used_slots++; +#ifdef DEBUG + memset(slot, 0xCB, arena->slot_size); +#endif } return slot;