summaryrefslogtreecommitdiff
path: root/kmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kmalloc.c')
-rw-r--r--kmalloc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kmalloc.c b/kmalloc.c
index f3c8238..34c466d 100644
--- a/kmalloc.c
+++ b/kmalloc.c
@@ -1,6 +1,7 @@
#include <assert.h>
#include <kmalloc.h>
#include <ksbrk.h>
+#include <math.h>
#define NEW_ALLOC_SIZE 0x30000
#define IS_FREE (1 << 0)
@@ -13,10 +14,6 @@ typedef struct MallocHeader {
struct MallocHeader *n;
} MallocHeader;
-size_t max(size_t a, size_t b) { return (a > b) ? a : b; }
-
-size_t min(size_t a, size_t b) { return (a < b) ? a : b; }
-
uint64_t delta_page(uint64_t a) { return 0x1000 - (a % 0x1000); }
MallocHeader *head = NULL;