aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-06 22:57:19 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-06 22:57:19 +0000
commitf341c297f662242a605858439a415daefd5fc76a (patch)
treea4c1821fe364820c5fe878b46368a2ec3fdd7a30
parent544e1130dffcf81e1a61d28f0849eb3b105f6a35 (diff)
downloadglibc-f341c297f662242a605858439a415daefd5fc76a.tar
glibc-f341c297f662242a605858439a415daefd5fc76a.tar.gz
glibc-f341c297f662242a605858439a415daefd5fc76a.tar.bz2
glibc-f341c297f662242a605858439a415daefd5fc76a.zip
Update.
1999-08-06 H.J. Lu <hjl@gnu.org> * malloc/malloc.c: Initialize __libc_pagesize early.
-rw-r--r--ChangeLog4
-rw-r--r--malloc/malloc.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3606f6ec2c..afa9e6c36f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1999-08-06 H.J. Lu <hjl@gnu.org>
+
+ * malloc/malloc.c: Initialize __libc_pagesize early.
+
1999-08-06 Ulrich Drepper <drepper@cygnus.com>
* string/string-inlines.c: Undefined __USE_STRING_INLINES before
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 143009bdfc..a45480c59f 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);
@@ -1671,9 +1673,6 @@ ptmalloc_init __MALLOC_P((void))
tsd_setspecific(arena_key, (Void_t *)&main_arena);
thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_init_all);
#else /* !defined NO_THREADS */
-#ifdef _LIBC
- __libc_pagesize = __getpagesize();
-#endif
#endif /* !defined NO_THREADS */
#if defined _LIBC || defined MALLOC_HOOKS
if((s = getenv("MALLOC_TRIM_THRESHOLD_")))