This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] malloc: remove get_backup_arena() from tcache_malloc()


get_backup_arena() appears useless on our systems anyway and is doubly
useless to tcache_malloc.  If we cannot allocate a cache we continue
without a cache and try again next time.  Saves 48 bytes of text.

JIRA: PURE-35526
---
 tpc/malloc2.13/tcache.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tpc/malloc2.13/tcache.h b/tpc/malloc2.13/tcache.h
index b7bdb9ad41e4..9e210a973d10 100644
--- a/tpc/malloc2.13/tcache.h
+++ b/tpc/malloc2.13/tcache.h
@@ -273,10 +273,6 @@ static void *tcache_malloc(size_t size)
 	if (!cache) {
 		arena = arena_get(sizeof(*cache));
 		cache = _int_malloc(arena, sizeof(*cache));
-		if (!cache) {
-			arena = get_backup_arena(arena, sizeof(*cache));
-			cache = _int_malloc(arena, sizeof(*cache));
-		}
 		arena_unlock(arena);
 		if (!cache)
 			return NULL;
-- 
2.7.0.rc3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]