about summary refs log tree commit diff
path: root/malloc/arena.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-10 14:34:15 -0400
commit3ce1f2959437e952b9db4eaeed2407424f11a4d1 (patch)
treedb47da854c7d3bfc2c3bce4c6fc8381075ac9ec4 /malloc/arena.c
parent1248c1c41508387ff282b208636737e8cdc9b5b0 (diff)
downloadglibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.gz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.xz
glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.zip
Cleanup of configuration options
Make several tool features mandatory and simplify the code.
Diffstat (limited to 'malloc/arena.c')
-rw-r--r--malloc/arena.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 59e96dbf09..29d8b2da47 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -1,5 +1,5 @@
 /* Malloc implementation for multiple threads without lock contention.
-   Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009,2010
+   Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009,2010,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@ -484,29 +484,6 @@ ptmalloc_init (void)
 #endif
     ptmalloc_init_minimal();
 
-#ifndef NO_THREADS
-# if defined _LIBC
-  /* We know __pthread_initialize_minimal has already been called,
-     and that is enough.  */
-#   define NO_STARTER
-# endif
-# ifndef NO_STARTER
-  /* With some threads implementations, creating thread-specific data
-     or initializing a mutex may call malloc() itself.  Provide a
-     simple starter version (realloc() won't work). */
-  save_malloc_hook = __malloc_hook;
-  save_memalign_hook = __memalign_hook;
-  save_free_hook = __free_hook;
-  __malloc_hook = malloc_starter;
-  __memalign_hook = memalign_starter;
-  __free_hook = free_starter;
-#  ifdef _LIBC
-  /* Initialize the pthreads interface. */
-  if (__pthread_initialize != NULL)
-    __pthread_initialize();
-#  endif /* !defined _LIBC */
-# endif	/* !defined NO_STARTER */
-#endif /* !defined NO_THREADS */
   mutex_init(&main_arena.mutex);
   main_arena.next = &main_arena;
 
@@ -526,15 +503,6 @@ ptmalloc_init (void)
   tsd_key_create(&arena_key, NULL);
   tsd_setspecific(arena_key, (Void_t *)&main_arena);
   thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_unlock_all2);
-#ifndef NO_THREADS
-# ifndef NO_STARTER
-  __malloc_hook = save_malloc_hook;
-  __memalign_hook = save_memalign_hook;
-  __free_hook = save_free_hook;
-# else
-#  undef NO_STARTER
-# endif
-#endif
 #ifdef _LIBC
   secure = __libc_enable_secure;
   s = NULL;