Small refactors around 7bb05e0.

This commit is contained in:
Qi Wang
2021-09-27 13:43:24 -07:00
committed by Qi Wang
parent 3c4b717ffc
commit 83f3294027
7 changed files with 21 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
#ifndef JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H
#define JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H
#ifndef JEMALLOC_INTERNAL_ARENA_STRUCTS_H
#define JEMALLOC_INTERNAL_ARENA_STRUCTS_H
#include "jemalloc/internal/arena_stats.h"
#include "jemalloc/internal/atomic.h"
@@ -98,4 +98,4 @@ struct arena_s {
bin_t bins[0];
};
#endif /* JEMALLOC_INTERNAL_ARENA_STRUCTS_B_H */
#endif /* JEMALLOC_INTERNAL_ARENA_STRUCTS_H */

View File

@@ -43,7 +43,7 @@ typedef enum {
struct arena_config_s {
/* extent hooks to be used for the arena */
struct extent_hooks_s *extent_hooks;
extent_hooks_t *extent_hooks;
/*
* Use extent hooks for metadata (base) allocations when true.

View File

@@ -65,8 +65,7 @@ arena_get(tsdn_t *tsdn, unsigned ind, bool init_if_missing) {
ret = (arena_t *)atomic_load_p(&arenas[ind], ATOMIC_ACQUIRE);
if (unlikely(ret == NULL)) {
if (init_if_missing) {
ret = arena_init(tsdn, ind,
&arena_config_default);
ret = arena_init(tsdn, ind, &arena_config_default);
}
}
return ret;