Use JEMALLOC_INLINE_C everywhere it's appropriate.
This commit is contained in:
parent
1f725eb7b5
commit
af1f592763
16
src/arena.c
16
src/arena.c
@ -39,7 +39,7 @@ arena_miscelm_to_bits(arena_chunk_map_misc_t *miscelm)
|
|||||||
return arena_mapbits_get(chunk, pageind);
|
return arena_mapbits_get(chunk, pageind);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
JEMALLOC_INLINE_C int
|
||||||
arena_run_comp(arena_chunk_map_misc_t *a, arena_chunk_map_misc_t *b)
|
arena_run_comp(arena_chunk_map_misc_t *a, arena_chunk_map_misc_t *b)
|
||||||
{
|
{
|
||||||
uintptr_t a_miscelm = (uintptr_t)a;
|
uintptr_t a_miscelm = (uintptr_t)a;
|
||||||
@ -55,7 +55,7 @@ arena_run_comp(arena_chunk_map_misc_t *a, arena_chunk_map_misc_t *b)
|
|||||||
rb_gen(static UNUSED, arena_run_tree_, arena_run_tree_t, arena_chunk_map_misc_t,
|
rb_gen(static UNUSED, arena_run_tree_, arena_run_tree_t, arena_chunk_map_misc_t,
|
||||||
rb_link, arena_run_comp)
|
rb_link, arena_run_comp)
|
||||||
|
|
||||||
static inline int
|
JEMALLOC_INLINE_C int
|
||||||
arena_avail_comp(arena_chunk_map_misc_t *a, arena_chunk_map_misc_t *b)
|
arena_avail_comp(arena_chunk_map_misc_t *a, arena_chunk_map_misc_t *b)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -139,7 +139,7 @@ arena_dirty_remove(arena_t *arena, arena_chunk_t *chunk, size_t pageind,
|
|||||||
arena->ndirty -= npages;
|
arena->ndirty -= npages;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *
|
JEMALLOC_INLINE_C void *
|
||||||
arena_run_reg_alloc(arena_run_t *run, arena_bin_info_t *bin_info)
|
arena_run_reg_alloc(arena_run_t *run, arena_bin_info_t *bin_info)
|
||||||
{
|
{
|
||||||
void *ret;
|
void *ret;
|
||||||
@ -159,7 +159,7 @@ arena_run_reg_alloc(arena_run_t *run, arena_bin_info_t *bin_info)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
JEMALLOC_INLINE_C void
|
||||||
arena_run_reg_dalloc(arena_run_t *run, void *ptr)
|
arena_run_reg_dalloc(arena_run_t *run, void *ptr)
|
||||||
{
|
{
|
||||||
arena_chunk_t *chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
|
arena_chunk_t *chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
|
||||||
@ -185,7 +185,7 @@ arena_run_reg_dalloc(arena_run_t *run, void *ptr)
|
|||||||
run->nfree++;
|
run->nfree++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
JEMALLOC_INLINE_C void
|
||||||
arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages)
|
arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages)
|
|||||||
(npages << LG_PAGE));
|
(npages << LG_PAGE));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
JEMALLOC_INLINE_C void
|
||||||
arena_run_page_mark_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
arena_run_page_mark_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ arena_run_page_mark_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
|||||||
<< LG_PAGE)), PAGE);
|
<< LG_PAGE)), PAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
JEMALLOC_INLINE_C void
|
||||||
arena_run_page_validate_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
arena_run_page_validate_zeroed(arena_chunk_t *chunk, size_t run_ind)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -834,7 +834,7 @@ arena_run_alloc_small(arena_t *arena, size_t size, index_t binind)
|
|||||||
return (arena_run_alloc_small_helper(arena, size, binind));
|
return (arena_run_alloc_small_helper(arena, size, binind));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
JEMALLOC_INLINE_C void
|
||||||
arena_maybe_purge(arena_t *arena)
|
arena_maybe_purge(arena_t *arena)
|
||||||
{
|
{
|
||||||
size_t threshold;
|
size_t threshold;
|
||||||
|
@ -16,14 +16,14 @@ static ctl_stats_t ctl_stats;
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Helpers for named and indexed nodes. */
|
/* Helpers for named and indexed nodes. */
|
||||||
|
|
||||||
static inline const ctl_named_node_t *
|
JEMALLOC_INLINE_C const ctl_named_node_t *
|
||||||
ctl_named_node(const ctl_node_t *node)
|
ctl_named_node(const ctl_node_t *node)
|
||||||
{
|
{
|
||||||
|
|
||||||
return ((node->named) ? (const ctl_named_node_t *)node : NULL);
|
return ((node->named) ? (const ctl_named_node_t *)node : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const ctl_named_node_t *
|
JEMALLOC_INLINE_C const ctl_named_node_t *
|
||||||
ctl_named_children(const ctl_named_node_t *node, int index)
|
ctl_named_children(const ctl_named_node_t *node, int index)
|
||||||
{
|
{
|
||||||
const ctl_named_node_t *children = ctl_named_node(node->children);
|
const ctl_named_node_t *children = ctl_named_node(node->children);
|
||||||
@ -31,7 +31,7 @@ ctl_named_children(const ctl_named_node_t *node, int index)
|
|||||||
return (children ? &children[index] : NULL);
|
return (children ? &children[index] : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const ctl_indexed_node_t *
|
JEMALLOC_INLINE_C const ctl_indexed_node_t *
|
||||||
ctl_indexed_node(const ctl_node_t *node)
|
ctl_indexed_node(const ctl_node_t *node)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
static inline int
|
JEMALLOC_INLINE_C int
|
||||||
extent_szad_comp(extent_node_t *a, extent_node_t *b)
|
extent_szad_comp(extent_node_t *a, extent_node_t *b)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -25,7 +25,7 @@ extent_szad_comp(extent_node_t *a, extent_node_t *b)
|
|||||||
rb_gen(, extent_tree_szad_, extent_tree_t, extent_node_t, link_szad,
|
rb_gen(, extent_tree_szad_, extent_tree_t, extent_node_t, link_szad,
|
||||||
extent_szad_comp)
|
extent_szad_comp)
|
||||||
|
|
||||||
static inline int
|
JEMALLOC_INLINE_C int
|
||||||
extent_ad_comp(extent_node_t *a, extent_node_t *b)
|
extent_ad_comp(extent_node_t *a, extent_node_t *b)
|
||||||
{
|
{
|
||||||
uintptr_t a_addr = (uintptr_t)a->addr;
|
uintptr_t a_addr = (uintptr_t)a->addr;
|
||||||
|
@ -244,7 +244,7 @@ bt_init(prof_bt_t *bt, void **vec)
|
|||||||
bt->len = 0;
|
bt->len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
JEMALLOC_INLINE_C void
|
||||||
prof_enter(prof_tdata_t *tdata)
|
prof_enter(prof_tdata_t *tdata)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ prof_enter(prof_tdata_t *tdata)
|
|||||||
malloc_mutex_lock(&bt2gctx_mtx);
|
malloc_mutex_lock(&bt2gctx_mtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
JEMALLOC_INLINE_C void
|
||||||
prof_leave(prof_tdata_t *tdata)
|
prof_leave(prof_tdata_t *tdata)
|
||||||
{
|
{
|
||||||
bool idump, gdump;
|
bool idump, gdump;
|
||||||
|
Loading…
Reference in New Issue
Block a user