aboutsummaryrefslogtreecommitdiff
path: root/src/lib/libc/malloc.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2016-07-16 15:59:46 +0200
committerAlex Auvolat <alex@adnab.me>2016-07-16 15:59:46 +0200
commit3d6a857b9186ef6304ea6cf04627c2b787169f29 (patch)
tree756179ce1e1838f75c57e3efec2a570d72051594 /src/lib/libc/malloc.c
parent59000174aa50ed6b2d24a71576d15e6a53c5be0c (diff)
downloadkogata-3d6a857b9186ef6304ea6cf04627c2b787169f29.tar.gz
kogata-3d6a857b9186ef6304ea6cf04627c2b787169f29.zip
Make way for libc implementation
Diffstat (limited to 'src/lib/libc/malloc.c')
-rw-r--r--src/lib/libc/malloc.c6
1 files changed, 3 insertions, 3 deletions
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() {