From 02d46fc4b969e25e4ba0c54aa95fa98d7279bd05 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Sep 2011 21:47:36 -0400 Subject: Simplify malloc initialization Singificantly reduce the code needed at malloc initialization. In the process getpagesize is simplified by always initializing GLRO(dl_pagesize). --- sysdeps/unix/sysv/linux/getpagesize.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'sysdeps/unix/sysv/linux') 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) -- cgit 1.4.1