From 3d6a857b9186ef6304ea6cf04627c2b787169f29 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jul 2016 15:59:46 +0200 Subject: Make way for libc implementation --- src/lib/libc/malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libc/malloc.c') diff --git a/src/lib/libc/malloc.c b/src/lib/libc/malloc.c index 2d43656..473404b 100644 --- a/src/lib/libc/malloc.c +++ b/src/lib/libc/malloc.c @@ -10,7 +10,7 @@ static void* heap_alloc_pages(size_t s) { void* addr = region_alloc(s, "Heap"); if (addr == 0) return 0; - bool map_ok = mmap(addr, s, FM_READ | FM_WRITE); + bool map_ok = sc_mmap(addr, s, FM_READ | FM_WRITE); if (!map_ok) { region_free(addr); return 0; @@ -20,7 +20,7 @@ static void* heap_alloc_pages(size_t s) { } static void heap_free_pages(void* addr) { - munmap(addr); + sc_munmap(addr); region_free(addr); } @@ -40,7 +40,7 @@ static slab_type_t slab_sizes[] = { }; bool mmap_single_page(void* addr) { - return mmap(addr, PAGE_SIZE, MM_READ | MM_WRITE); + return sc_mmap(addr, PAGE_SIZE, MM_READ | MM_WRITE); } void malloc_setup() { -- cgit v1.2.3