mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
1999-08-06 H.J. Lu <hjl@gnu.org> * malloc/malloc.c: Initialize __libc_pagesize early.
This commit is contained in:
@ -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>
|
1999-08-06 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* string/string-inlines.c: Undefined __USE_STRING_INLINES before
|
* string/string-inlines.c: Undefined __USE_STRING_INLINES before
|
||||||
|
@ -1649,6 +1649,9 @@ ptmalloc_init __MALLOC_P((void))
|
|||||||
|
|
||||||
if(__malloc_initialized >= 0) return;
|
if(__malloc_initialized >= 0) return;
|
||||||
__malloc_initialized = 0;
|
__malloc_initialized = 0;
|
||||||
|
#ifdef _LIBC
|
||||||
|
__libc_pagesize = __getpagesize();
|
||||||
|
#endif
|
||||||
#ifndef NO_THREADS
|
#ifndef NO_THREADS
|
||||||
#if defined _LIBC || defined MALLOC_HOOKS
|
#if defined _LIBC || defined MALLOC_HOOKS
|
||||||
/* With some threads implementations, creating thread-specific data
|
/* With some threads implementations, creating thread-specific data
|
||||||
@ -1663,7 +1666,6 @@ ptmalloc_init __MALLOC_P((void))
|
|||||||
/* Initialize the pthreads interface. */
|
/* Initialize the pthreads interface. */
|
||||||
if (__pthread_initialize != NULL)
|
if (__pthread_initialize != NULL)
|
||||||
__pthread_initialize();
|
__pthread_initialize();
|
||||||
__libc_pagesize = __getpagesize();
|
|
||||||
#endif
|
#endif
|
||||||
mutex_init(&main_arena.mutex);
|
mutex_init(&main_arena.mutex);
|
||||||
mutex_init(&list_lock);
|
mutex_init(&list_lock);
|
||||||
@ -1671,9 +1673,6 @@ ptmalloc_init __MALLOC_P((void))
|
|||||||
tsd_setspecific(arena_key, (Void_t *)&main_arena);
|
tsd_setspecific(arena_key, (Void_t *)&main_arena);
|
||||||
thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_init_all);
|
thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_init_all);
|
||||||
#else /* !defined NO_THREADS */
|
#else /* !defined NO_THREADS */
|
||||||
#ifdef _LIBC
|
|
||||||
__libc_pagesize = __getpagesize();
|
|
||||||
#endif
|
|
||||||
#endif /* !defined NO_THREADS */
|
#endif /* !defined NO_THREADS */
|
||||||
#if defined _LIBC || defined MALLOC_HOOKS
|
#if defined _LIBC || defined MALLOC_HOOKS
|
||||||
if((s = getenv("MALLOC_TRIM_THRESHOLD_")))
|
if((s = getenv("MALLOC_TRIM_THRESHOLD_")))
|
||||||
|
Reference in New Issue
Block a user