commit d90f00c4eb6d79987829cfe81ea72246dbf3ba7d
parent 762846a172e46a40204443f4e1b1512d4d46b25a
Author: sin <sin@2f30.org>
Date: Thu, 1 Aug 2013 16:41:54 +0100
Rename mmap_pages() to alloc_block()
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/random/rballoc.c b/random/rballoc.c
@@ -85,8 +85,10 @@ free_object(void *p, size_t siz)
munmap(p, siz);
}
+/* Allocate a memory block. Round `siz' to be
+ * a multiple of PAGESIZE */
static void *
-mmap_pages(size_t siz)
+alloc_block(size_t siz)
{
void *addr;
@@ -116,7 +118,7 @@ malloc(size_t siz)
an = alloc_object(sizeof(*an));
if (!an)
return NULL;
- p = mmap_pages(siz);
+ p = alloc_block(siz);
if (!p) {
free_object(an, sizeof(*an));
return NULL;