Make eligible global variables static and/or const

For better or worse, Jemalloc has a significant number of global
variables. Making all eligible global variables `static` and/or `const`
at least makes it slightly easier to reason about them, as these
qualifications communicate to the programmer restrictions on their use
without having to `grep` the whole codebase.
This commit is contained in:
Kevin Svetlitski
2023-05-18 10:22:58 -07:00
committed by Qi Wang
parent e249d1a2a1
commit 589c63b424
21 changed files with 30 additions and 33 deletions

View File

@@ -37,7 +37,7 @@ static hpa_shard_opts_t test_hpa_shard_opts_default = {
};
static hpa_shard_t *
create_test_data(hpa_hooks_t *hooks, hpa_shard_opts_t *opts) {
create_test_data(const hpa_hooks_t *hooks, hpa_shard_opts_t *opts) {
bool err;
base_t *base = base_new(TSDN_NULL, /* ind */ SHARD_IND,
&ehooks_default_extent_hooks, /* metadata_use_hooks */ true);