mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-08 14:57:21 +03:00
Make single-TU internal helpers static; remove dead hpa_expand/hpa_shrink/pac_reset
This commit is contained in:
parent
5bc8d6e9e2
commit
aae199f40f
10 changed files with 5 additions and 41 deletions
|
|
@ -294,7 +294,7 @@ arena_cache_bin_array_unregister(tsdn_t *tsdn, arena_t *arena,
|
|||
* from scratch (descriptors held by other threads at fork time are gone)
|
||||
* without locking.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
arena_cache_bin_array_postfork_child(arena_t *arena,
|
||||
cache_bin_array_descriptor_t *desc_or_null) {
|
||||
cassert(config_stats);
|
||||
|
|
@ -652,7 +652,7 @@ arena_do_deferred_work(tsdn_t *tsdn, arena_t *arena) {
|
|||
pa_shard_do_deferred_work(tsdn, &arena->pa_shard);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
arena_slab_dalloc(tsdn_t *tsdn, arena_t *arena, edata_t *slab) {
|
||||
bool deferred_work_generated = false;
|
||||
pa_dalloc(tsdn, &arena->pa_shard, slab, &deferred_work_generated);
|
||||
|
|
|
|||
14
src/hpa.c
14
src/hpa.c
|
|
@ -978,20 +978,6 @@ hpa_alloc(tsdn_t *tsdn, hpa_shard_t *shard, size_t size, size_t alignment,
|
|||
return edata;
|
||||
}
|
||||
|
||||
bool
|
||||
hpa_expand(tsdn_t *tsdn, hpa_shard_t *shard, edata_t *edata, size_t old_size,
|
||||
size_t new_size, bool zero, bool *deferred_work_generated) {
|
||||
/* Expand not yet supported. */
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
hpa_shrink(tsdn_t *tsdn, hpa_shard_t *shard, edata_t *edata, size_t old_size,
|
||||
size_t new_size, bool *deferred_work_generated) {
|
||||
/* Shrink not yet supported. */
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
hpa_dalloc_prepare_unlocked(tsdn_t *tsdn, hpa_shard_t *shard, edata_t *edata) {
|
||||
malloc_mutex_assert_not_owner(tsdn, &shard->mtx);
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ nstime_divide(const nstime_t *time, const nstime_t *divisor) {
|
|||
return time->ns / divisor->ns;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
static uint64_t
|
||||
nstime_ns_between(const nstime_t *earlier, const nstime_t *later) {
|
||||
nstime_assert_initialized(earlier);
|
||||
nstime_assert_initialized(later);
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ pa_shard_nactive(const pa_shard_t *shard) {
|
|||
return atomic_load_zu(&shard->nactive, ATOMIC_RELAXED);
|
||||
}
|
||||
|
||||
size_t
|
||||
static size_t
|
||||
pa_shard_ndirty(const pa_shard_t *shard) {
|
||||
size_t ndirty = ecache_npages_get(&shard->pac.ecache_dirty);
|
||||
if (shard->ever_used_hpa) {
|
||||
|
|
@ -90,7 +90,7 @@ pa_shard_ndirty(const pa_shard_t *shard) {
|
|||
return ndirty;
|
||||
}
|
||||
|
||||
size_t
|
||||
static size_t
|
||||
pa_shard_nmuzzy(const pa_shard_t *shard) {
|
||||
return ecache_npages_get(&shard->pac.ecache_muzzy);
|
||||
}
|
||||
|
|
|
|||
10
src/pac.c
10
src/pac.c
|
|
@ -747,16 +747,6 @@ pac_decay_ms_get(pac_t *pac, extent_state_t state) {
|
|||
return decay_ms_read(decay);
|
||||
}
|
||||
|
||||
void
|
||||
pac_reset(tsdn_t *tsdn, pac_t *pac) {
|
||||
/*
|
||||
* No-op for now; purging is still done at the arena-level. It should
|
||||
* get moved in here, though.
|
||||
*/
|
||||
(void)tsdn;
|
||||
(void)pac;
|
||||
}
|
||||
|
||||
void
|
||||
pac_destroy(tsdn_t *tsdn, pac_t *pac) {
|
||||
assert(ecache_npages_get(&pac->ecache_dirty) == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue