mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 00:23:33 +03:00
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:
parent
e249d1a2a1
commit
589c63b424
21 changed files with 30 additions and 33 deletions
2
src/pa.c
2
src/pa.c
|
|
@ -17,7 +17,7 @@ pa_nactive_sub(pa_shard_t *shard, size_t sub_pages) {
|
|||
|
||||
bool
|
||||
pa_central_init(pa_central_t *central, base_t *base, bool hpa,
|
||||
hpa_hooks_t *hpa_hooks) {
|
||||
const hpa_hooks_t *hpa_hooks) {
|
||||
bool err;
|
||||
if (hpa) {
|
||||
err = hpa_central_init(¢ral->hpa, base, hpa_hooks);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue