From 794d3ae39b503b92b6aa4b59afaaa83a8ed818da Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 6 Aug 1999 22:58:56 +0000 Subject: [PATCH] Initialize __libc_pagesize early. --- malloc/malloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/malloc/malloc.c b/malloc/malloc.c index a2b80a99975..eba2a609151 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -1649,6 +1649,9 @@ ptmalloc_init __MALLOC_P((void)) if(__malloc_initialized >= 0) return; __malloc_initialized = 0; +#ifdef _LIBC + __libc_pagesize = __getpagesize(); +#endif #ifndef NO_THREADS #if defined _LIBC || defined MALLOC_HOOKS /* With some threads implementations, creating thread-specific data @@ -1663,7 +1666,6 @@ ptmalloc_init __MALLOC_P((void)) /* Initialize the pthreads interface. */ if (__pthread_initialize != NULL) __pthread_initialize(); - __libc_pagesize = __getpagesize(); #endif mutex_init(&main_arena.mutex); mutex_init(&list_lock); -- 2.47.2