mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-20 11:56:23 +03:00
edata_cache: Remember the associated base_t.
This will save us some trouble down the line when we stop passing arena pointers everywhere; we won't have to pass around a base_t pointer either.
This commit is contained in:
parent
ae23e5f426
commit
c792f3e4ab
5 changed files with 20 additions and 16 deletions
|
|
@ -12,12 +12,13 @@ struct edata_cache_s {
|
|||
edata_tree_t avail;
|
||||
atomic_zu_t count;
|
||||
malloc_mutex_t mtx;
|
||||
base_t *base;
|
||||
};
|
||||
|
||||
bool edata_cache_init(edata_cache_t *edata_cache);
|
||||
edata_t *edata_cache_get(tsdn_t *tsdn, edata_cache_t *edata_cache,
|
||||
base_t *base);
|
||||
bool edata_cache_init(edata_cache_t *edata_cache, base_t *base);
|
||||
edata_t *edata_cache_get(tsdn_t *tsdn, edata_cache_t *edata_cache);
|
||||
void edata_cache_put(tsdn_t *tsdn, edata_cache_t *edata_cache, edata_t *edata);
|
||||
|
||||
void edata_cache_prefork(tsdn_t *tsdn, edata_cache_t *edata_cache);
|
||||
void edata_cache_postfork_parent(tsdn_t *tsdn, edata_cache_t *edata_cache);
|
||||
void edata_cache_postfork_child(tsdn_t *tsdn, edata_cache_t *edata_cache);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue