diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 21:47:36 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 21:47:36 -0400 |
commit | 02d46fc4b969e25e4ba0c54aa95fa98d7279bd05 (patch) | |
tree | 8d0fc5bfaeac42091551da91a1f992ff656f1f56 /sysdeps/unix | |
parent | 22a89187139a9083ca73989bfd11597e0f85cb61 (diff) | |
download | glibc-02d46fc4b969e25e4ba0c54aa95fa98d7279bd05.tar.gz glibc-02d46fc4b969e25e4ba0c54aa95fa98d7279bd05.tar.xz glibc-02d46fc4b969e25e4ba0c54aa95fa98d7279bd05.zip |
Simplify malloc initialization
Singificantly reduce the code needed at malloc initialization. In the process getpagesize is simplified by always initializing GLRO(dl_pagesize).
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/getpagesize.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/sysdeps/unix/sysv/linux/getpagesize.c b/sysdeps/unix/sysv/linux/getpagesize.c index 0866079511..0de52ea4fd 100644 --- a/sysdeps/unix/sysv/linux/getpagesize.c +++ b/sysdeps/unix/sysv/linux/getpagesize.c @@ -28,26 +28,8 @@ int __getpagesize () { -#ifdef __ASSUME_AT_PAGESIZE assert (GLRO(dl_pagesize) != 0); return GLRO(dl_pagesize); -#else - if (GLRO(dl_pagesize) != 0) - return GLRO(dl_pagesize); - -# ifdef EXEC_PAGESIZE - return EXEC_PAGESIZE; -# else /* No EXEC_PAGESIZE. */ -# ifdef NBPG -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* No CLSIZE. */ - return NBPG * CLSIZE; -# else /* No NBPG. */ - return NBPC; -# endif /* NBPG. */ -# endif /* EXEC_PAGESIZE. */ -#endif } libc_hidden_def (__getpagesize) weak_alias (__getpagesize, getpagesize) |