From 3305ef401c2c31a3e5909fd156c402c9c2cb57dd Mon Sep 17 00:00:00 2001 From: Greg Bowne Date: Wed, 14 Feb 2024 16:55:09 -0800 Subject: [PATCH] oops forgot the last of the changes --- main.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/main.c b/main.c index 1774a16..fba46ac 100644 --- a/main.c +++ b/main.c @@ -1,19 +1,11 @@ #include #include #include -<<<<<<< HEAD #include -======= -#include ->>>>>>> origin/main #define ALIGN16(s) (((s) + 15) & ~0x0F) #define BLOCK_SIZE sizeof(struct block) -<<<<<<< HEAD #define MINIMUM_BLOCK_SIZE (sizeof(struct block) + 16) -======= -#define MINIMUM_BLOCK_SIZE 4 ->>>>>>> origin/main /// The memory block's header. struct block @@ -36,18 +28,12 @@ struct block *extend_heap(size_t s) if (s < MINIMUM_BLOCK_SIZE) s = MINIMUM_BLOCK_SIZE; -<<<<<<< HEAD struct block *b = (struct block *)sbrk(0); // Get the current break // Add the size of the block header to the requested size s += BLOCK_SIZE; if (sbrk(s) == (void *)-1) // Extend the break by s bytes -======= - struct block* b = (struct block*)syscall(SYS_brk, NULL); - - if ((void*)syscall(SYS_brk, (char*)(b + 1) + s) == (void*)-1) ->>>>>>> origin/main return NULL; b->size = s;