From b09e0c333e146dd224767dadfea07bf72dd0192f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 13 Feb 2016 20:08:35 +0000 Subject: [PATCH] memory: bring more files into line with new prototypes --- Kernel/simple.c | 4 ++-- Kernel/single.c | 8 ++++---- Kernel/unbanked.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Kernel/simple.c b/Kernel/simple.c index 1b1e8ab5..13df4f3b 100644 --- a/Kernel/simple.c +++ b/Kernel/simple.c @@ -34,14 +34,14 @@ int pagemap_alloc(ptptr p) return 0; } -int pagemap_realloc(uint16_t size) +int pagemap_realloc(usize_t size) { if (size >= ramtop) return ENOMEM; return 0; } -uint16_t pagemap_mem_used(void) +usize_t pagemap_mem_used(void) { return (PROGTOP - PROGBASE) >> 10; } diff --git a/Kernel/single.c b/Kernel/single.c index bc6b47f2..09cacb7e 100644 --- a/Kernel/single.c +++ b/Kernel/single.c @@ -48,18 +48,18 @@ int pagemap_alloc(ptptr p) return 0; } -int pagemap_realloc(uint16_t size) +int pagemap_realloc(usize_t size) { - if (size >= (uint16_t) ramtop) + if (size >= (usize_t) ramtop) return ENOMEM; udata.u_ptab->p_page = 1; udata.u_page = 1; return 0; } -uint16_t pagemap_mem_used(void) +usize_t pagemap_mem_used(void) { - uint16_t mem = PROGTOP - ramtop + (uint16_t)udata.u_top; + usize_t mem = PROGTOP - ramtop + (usize_t)udata.u_top; return mem >> 10; } diff --git a/Kernel/unbanked.c b/Kernel/unbanked.c index ead71a75..70e43eae 100644 --- a/Kernel/unbanked.c +++ b/Kernel/unbanked.c @@ -258,7 +258,7 @@ static int pagemap_can_alloc(uint16_t size) /* * Realloc our buffer. Naïve implementation. */ -int pagemap_realloc(uint16_t size) +int pagemap_realloc(usize_t size) { if (size == udata.u_top) return 0; @@ -290,7 +290,7 @@ void pagemap_free(ptptr p) * This is the only spot which cares what size a "block" is. For now its 256 * bytes because that makes shifting it really cheap! */ -static unsigned int pagemap_mem_used(void) +static usize_t pagemap_mem_used(void) { struct hole *m; unsigned int ret = 0; -- 2.34.1