This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] malloc: remove get_backup_arena() from tcache_malloc()
- From: Joern Engel <joern at purestorage dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, Joern Engel <joern at purestorage dot com>
- Date: Mon, 25 Jan 2016 16:25:33 -0800
- Subject: [PATCH] malloc: remove get_backup_arena() from tcache_malloc()
- Authentication-results: sourceware.org; auth=none
- References: <1453767942-19369-1-git-send-email-joern at purestorage dot com>
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