mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
Drop unused first argument from arena_get2
The arena pointer in the first argument to arena_get2 was used in the old days before per-thread arenas. They're unused now and hence can be dropped. ChangeLog: * malloc/arena.c (arena_get2): Drop unused argument. (arena_lock): Adjust. (arena_get_retry): Likewise.
This commit is contained in:
parent
be481652f2
commit
92a9b22d70
@ -1,3 +1,9 @@
|
|||||||
|
2015-08-24 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||||
|
|
||||||
|
* malloc/arena.c (arena_get2): Drop unused argument.
|
||||||
|
(arena_lock): Adjust.
|
||||||
|
(arena_get_retry): Likewise.
|
||||||
|
|
||||||
2015-08-24 Andreas Schwab <schwab@suse.de>
|
2015-08-24 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_IPC64):
|
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_IPC64):
|
||||||
|
@ -102,7 +102,7 @@ int __malloc_initialized = -1;
|
|||||||
if (ptr && !arena_is_corrupt (ptr)) \
|
if (ptr && !arena_is_corrupt (ptr)) \
|
||||||
(void) mutex_lock (&ptr->mutex); \
|
(void) mutex_lock (&ptr->mutex); \
|
||||||
else \
|
else \
|
||||||
ptr = arena_get2 (ptr, (size), NULL); \
|
ptr = arena_get2 ((size), NULL); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* find the heap and corresponding arena for a given ptr */
|
/* find the heap and corresponding arena for a given ptr */
|
||||||
@ -849,7 +849,7 @@ out:
|
|||||||
|
|
||||||
static mstate
|
static mstate
|
||||||
internal_function
|
internal_function
|
||||||
arena_get2 (mstate a_tsd, size_t size, mstate avoid_arena)
|
arena_get2 (size_t size, mstate avoid_arena)
|
||||||
{
|
{
|
||||||
mstate a;
|
mstate a;
|
||||||
|
|
||||||
@ -914,10 +914,8 @@ arena_get_retry (mstate ar_ptr, size_t bytes)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Grab ar_ptr->next prior to releasing its lock. */
|
|
||||||
mstate prev = ar_ptr->next ? ar_ptr : 0;
|
|
||||||
(void) mutex_unlock (&ar_ptr->mutex);
|
(void) mutex_unlock (&ar_ptr->mutex);
|
||||||
ar_ptr = arena_get2 (prev, bytes, ar_ptr);
|
ar_ptr = arena_get2 (bytes, ar_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ar_ptr;
|
return ar_ptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user