diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 14:34:15 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 14:34:15 -0400 |
commit | 3ce1f2959437e952b9db4eaeed2407424f11a4d1 (patch) | |
tree | db47da854c7d3bfc2c3bce4c6fc8381075ac9ec4 /malloc | |
parent | 1248c1c41508387ff282b208636737e8cdc9b5b0 (diff) | |
download | glibc-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')
-rw-r--r-- | malloc/arena.c | 34 | ||||
-rw-r--r-- | malloc/set-freeres.c | 8 |
2 files changed, 3 insertions, 39 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; diff --git a/malloc/set-freeres.c b/malloc/set-freeres.c index 6123141ed1..dfd4641a71 100644 --- a/malloc/set-freeres.c +++ b/malloc/set-freeres.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1999,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999-2003,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,9 +21,7 @@ #include <set-hooks.h> #include <libc-internal.h> -#ifdef USE_IN_LIBIO -# include "../libio/libioP.h" -#endif +#include "../libio/libioP.h" DEFINE_HOOK (__libc_subfreeres, (void)); @@ -40,9 +38,7 @@ __libc_freeres (void) { void * const *p; -#ifdef USE_IN_LIBIO _IO_cleanup (); -#endif RUN_HOOK (__libc_subfreeres, ()); |