diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-16 18:12:51 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-16 18:12:51 +0100 |
commit | ccd468e576a96599cee5407a6c7d037f3edef9c1 (patch) | |
tree | b93b4f900f6119e359b3ec70f80ce87628568850 /src/malloc.c | |
parent | fix issue #6 on github (diff) | |
download | slibc-ccd468e576a96599cee5407a6c7d037f3edef9c1.tar.gz slibc-ccd468e576a96599cee5407a6c7d037f3edef9c1.tar.bz2 slibc-ccd468e576a96599cee5407a6c7d037f3edef9c1.tar.xz |
the pagesize shall be retrieved in crt0 to avoid an unnecessary branching in calls to malloc-functions
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/malloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |