mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-13 15:35:37 +03:00
Fix -Wmissing-prototypes, -Wmissing-variable-declarations, and -Wstrict-prototypes warnings
This commit is contained in:
parent
6054b976ef
commit
a6048680a8
7 changed files with 12 additions and 9 deletions
|
|
@ -7,9 +7,9 @@ void malloc_conf_init(sc_data_t *sc_data, unsigned bin_shard_sizes[SC_NBINS],
|
|||
char readlink_buf[PATH_MAX + 1]);
|
||||
void malloc_abort_invalid_conf(void);
|
||||
|
||||
#ifdef JEMALLOC_JET
|
||||
extern bool had_conf_error;
|
||||
|
||||
#ifdef JEMALLOC_JET
|
||||
bool conf_next(char const **opts_p, char const **k_p, size_t *klen_p,
|
||||
char const **v_p, size_t *vlen_p);
|
||||
void conf_error(
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ extern char opt_stats_interval_opts[stats_print_tot_num_options + 1];
|
|||
#define STATS_INTERVAL_ACCUM_LG_BATCH_SIZE 6
|
||||
#define STATS_INTERVAL_ACCUM_BATCH_MAX (4 << 20)
|
||||
|
||||
/* Per thread batch accum size for stats_interval; read by thread event. */
|
||||
extern uint64_t stats_interval_accum_batch;
|
||||
|
||||
/* Only accessed by thread event. */
|
||||
extern te_base_cb_t stats_interval_te_handler;
|
||||
|
||||
|
|
|
|||
|
|
@ -783,7 +783,7 @@ os_overcommits_proc(void) {
|
|||
#endif
|
||||
|
||||
static bool
|
||||
pages_should_skip_set_thp_state() {
|
||||
pages_should_skip_set_thp_state(void) {
|
||||
if (opt_thp == thp_mode_do_nothing
|
||||
|| (opt_thp == thp_mode_always
|
||||
&& init_system_thp_mode == system_thp_mode_always)
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ prof_sample_new_event_wait(tsd_t *tsd) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
prof_sample_event_handler(tsd_t *tsd) {
|
||||
cassert(config_prof);
|
||||
if (prof_interval == 0 || !prof_active_get_unlocked()) {
|
||||
|
|
|
|||
|
|
@ -2208,17 +2208,17 @@ stats_print(write_cb_t *write_cb, void *cbopaque, const char *opts) {
|
|||
emitter_end(&emitter);
|
||||
}
|
||||
|
||||
uint64_t
|
||||
static uint64_t
|
||||
stats_interval_new_event_wait(tsd_t *tsd) {
|
||||
return stats_interval_accum_batch;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
static uint64_t
|
||||
stats_interval_postponed_event_wait(tsd_t *tsd) {
|
||||
return TE_MIN_START_WAIT;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stats_interval_event_handler(tsd_t *tsd) {
|
||||
uint64_t last_event = thread_allocated_last_event_get(tsd);
|
||||
uint64_t last_sample_event = tsd_stats_interval_last_event_get(tsd);
|
||||
|
|
|
|||
|
|
@ -112,12 +112,12 @@ tcache_salloc(tsdn_t *tsdn, const void *ptr) {
|
|||
return arena_salloc(tsdn, ptr);
|
||||
}
|
||||
|
||||
uint64_t
|
||||
static uint64_t
|
||||
tcache_gc_new_event_wait(tsd_t *tsd) {
|
||||
return opt_tcache_gc_incr_bytes;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
static uint64_t
|
||||
tcache_gc_postponed_event_wait(tsd_t *tsd) {
|
||||
return TE_MIN_START_WAIT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "jemalloc/internal/jemalloc_internal_inlines_a.h"
|
||||
#include "jemalloc/internal/peak_event.h"
|
||||
#include "jemalloc/internal/prof.h"
|
||||
#include "jemalloc/internal/stats.h"
|
||||
#include "jemalloc/internal/tcache.h"
|
||||
#include "jemalloc/internal/thread_event.h"
|
||||
#include "jemalloc/internal/thread_event_registry.h"
|
||||
|
|
@ -185,7 +186,6 @@ te_update_wait(tsd_t *tsd, uint64_t accumbytes, bool allow, uint64_t *ev_wait,
|
|||
return ret;
|
||||
}
|
||||
|
||||
extern uint64_t stats_interval_accum_batch;
|
||||
/* Return number of handlers enqueued into to_trigger array */
|
||||
static inline size_t
|
||||
te_update_alloc_events(tsd_t *tsd, te_base_cb_t **to_trigger,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue