From 5e2f03296e6bd5fc29e533de5b27a4506821e782 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 7 Oct 2018 16:18:17 -0400 Subject: [PATCH] remove old debugging code --- malloc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/malloc.c b/malloc.c index 2fd9aa8..33688aa 100644 --- a/malloc.c +++ b/malloc.c @@ -189,24 +189,15 @@ static struct slab_metadata *alloc_metadata(struct size_class *c, size_t slab_si return metadata; } -static void check_index(size_t index) { - if (index >= 64) { - fatal_error("invalid index"); - } -} - static void set_slot(struct slab_metadata *metadata, size_t index) { - check_index(index); metadata->bitmap |= 1UL << index; } static void clear_slot(struct slab_metadata *metadata, size_t index) { - check_index(index); metadata->bitmap &= ~(1UL << index); } static bool get_slot(struct slab_metadata *metadata, size_t index) { - check_index(index); return (metadata->bitmap >> index) & 1UL; }