mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 00:57:19 +03:00
Small refactors around 7bb05e0.
This commit is contained in:
parent
3c4b717ffc
commit
83f3294027
7 changed files with 21 additions and 23 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue