From ccd468e576a96599cee5407a6c7d037f3edef9c1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 16 Dec 2015 18:12:51 +0100 Subject: the pagesize shall be retrieved in crt0 to avoid an unnecessary branching in calls to malloc-functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/malloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/malloc.c b/src/malloc.c index 1a0913c..21de34f 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -51,6 +51,7 @@ static size_t get_pagesize(void) static size_t pagesize = 0; if (pagesize == 0) { + /* TODO This should be done i crt0. */ long r = sysconf(_SC_PAGESIZE); pagesize = (size_t)(r == -1 ? 4096 : r); } -- cgit v1.2.3-70-g09d2