s/CHUNK_HOOKS_INITIALIZER/EXTENT_HOOKS_INITIALIZER/g
This commit is contained in:
parent
c9a76481d8
commit
4a55daa363
@ -11,16 +11,6 @@
|
||||
#define CHUNK_CEILING(s) \
|
||||
(((s) + chunksize_mask) & ~chunksize_mask)
|
||||
|
||||
#define CHUNK_HOOKS_INITIALIZER { \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL \
|
||||
}
|
||||
|
||||
#endif /* JEMALLOC_H_TYPES */
|
||||
/******************************************************************************/
|
||||
#ifdef JEMALLOC_H_STRUCTS
|
||||
|
@ -3,6 +3,16 @@
|
||||
|
||||
typedef struct extent_s extent_t;
|
||||
|
||||
#define EXTENT_HOOKS_INITIALIZER { \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL, \
|
||||
NULL \
|
||||
}
|
||||
|
||||
#endif /* JEMALLOC_H_TYPES */
|
||||
/******************************************************************************/
|
||||
#ifdef JEMALLOC_H_STRUCTS
|
||||
|
@ -347,7 +347,7 @@ arena_chunk_alloc_large(tsdn_t *tsdn, arena_t *arena, size_t usize,
|
||||
size_t alignment, bool *zero)
|
||||
{
|
||||
extent_t *extent;
|
||||
extent_hooks_t extent_hooks = CHUNK_HOOKS_INITIALIZER;
|
||||
extent_hooks_t extent_hooks = EXTENT_HOOKS_INITIALIZER;
|
||||
|
||||
malloc_mutex_lock(tsdn, &arena->lock);
|
||||
|
||||
@ -373,7 +373,7 @@ void
|
||||
arena_chunk_dalloc_large(tsdn_t *tsdn, arena_t *arena, extent_t *extent,
|
||||
bool locked)
|
||||
{
|
||||
extent_hooks_t extent_hooks = CHUNK_HOOKS_INITIALIZER;
|
||||
extent_hooks_t extent_hooks = EXTENT_HOOKS_INITIALIZER;
|
||||
|
||||
if (!locked)
|
||||
malloc_mutex_lock(tsdn, &arena->lock);
|
||||
@ -866,7 +866,7 @@ arena_purge(tsdn_t *tsdn, arena_t *arena, bool all)
|
||||
static void
|
||||
arena_slab_dalloc(tsdn_t *tsdn, arena_t *arena, extent_t *slab)
|
||||
{
|
||||
extent_hooks_t extent_hooks = CHUNK_HOOKS_INITIALIZER;
|
||||
extent_hooks_t extent_hooks = EXTENT_HOOKS_INITIALIZER;
|
||||
|
||||
arena_nactive_sub(arena, extent_size_get(slab) >> LG_PAGE);
|
||||
arena_chunk_cache_dalloc_locked(tsdn, arena, &extent_hooks, slab);
|
||||
@ -1009,7 +1009,7 @@ arena_slab_alloc(tsdn_t *tsdn, arena_t *arena, szind_t binind,
|
||||
{
|
||||
extent_t *slab;
|
||||
arena_slab_data_t *slab_data;
|
||||
extent_hooks_t extent_hooks = CHUNK_HOOKS_INITIALIZER;
|
||||
extent_hooks_t extent_hooks = EXTENT_HOOKS_INITIALIZER;
|
||||
bool zero;
|
||||
|
||||
zero = false;
|
||||
|
@ -131,7 +131,7 @@ extent_hooks_assure_initialized_impl(tsdn_t *tsdn, arena_t *arena,
|
||||
extent_hooks_t *extent_hooks, bool locked)
|
||||
{
|
||||
static const extent_hooks_t uninitialized_hooks =
|
||||
CHUNK_HOOKS_INITIALIZER;
|
||||
EXTENT_HOOKS_INITIALIZER;
|
||||
|
||||
if (memcmp(extent_hooks, &uninitialized_hooks, sizeof(extent_hooks_t))
|
||||
== 0) {
|
||||
|
@ -137,7 +137,7 @@ chunk_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
|
||||
malloc_mutex_unlock(tsdn, &dss_mtx);
|
||||
if (pad_size != 0) {
|
||||
extent_hooks_t extent_hooks =
|
||||
CHUNK_HOOKS_INITIALIZER;
|
||||
EXTENT_HOOKS_INITIALIZER;
|
||||
chunk_dalloc_wrapper(tsdn, arena,
|
||||
&extent_hooks, pad);
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user