From 66f8fa9bec0c6f0e62ccaad22f8ddd36267a5284 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 30 Jul 1999 06:32:48 +0000 Subject: Update. * malloc/malloc.c (ptmalloc_init): Also initialize __libc_pagesize if no threads are used. * libio/iofwrite.c: Add weak alias for _unlocked function if not _IO_MTSAFE_IO. * libio/iofread.c: Likewise. * libio/iofgets.c: Likewise. * libio/iofputs.c: Likewise. * sysdeps/generic/bits/libc-lock.h (__libc_cleanup_end): New definition. --- malloc/malloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'malloc/malloc.c') diff --git a/malloc/malloc.c b/malloc/malloc.c index a2b80a9..db12226 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -1663,7 +1663,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); @@ -1671,6 +1670,9 @@ ptmalloc_init __MALLOC_P((void)) tsd_setspecific(arena_key, (Void_t *)&main_arena); thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_init_all); #endif /* !defined NO_THREADS */ +#ifdef _LIBC + __libc_pagesize = __getpagesize(); +#endif #if defined _LIBC || defined MALLOC_HOOKS if((s = getenv("MALLOC_TRIM_THRESHOLD_"))) mALLOPt(M_TRIM_THRESHOLD, atoi(s)); -- cgit v1.1