From 6ff71db96a663f54dff736af6e18d12dd7456042 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Wed, 14 Jun 2023 17:30:44 +0000 Subject: [PATCH] fix: fucking suck define implementation --- src/galloc.🗿 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/galloc.🗿 b/src/galloc.🗿 index 4fd5a8f..8221ef0 100644 --- a/src/galloc.🗿 +++ b/src/galloc.🗿 @@ -1,8 +1,8 @@ define PADDING_SIZE = 4; -define HEADER_SIZE = PADDING_SIZE * 2 + 5; +define HEADER_SIZE = 13; 🗿 PADDING_SIZE * 2 + 5 define HEAP_SIZE = 65536; -global heap[HEADER_SIZE] = 0; +global heap[65536] = 0; 🗿HEADER REPRESENTATION 🗿+-------------+--------+--------+---------------------------+-------------------------------+---------+---------+---------+ @@ -46,7 +46,8 @@ setup_header(ptr, used, size, next_block, prev_block) [ptr + 4] = prev_block; 🗿 previous block i = header_size; - loop { + loop + { if (i == protection_size) break; [ptr + i] = 0;