mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-27 21:32:16 +03:00
Delete the mutex_pool module.
This commit is contained in:
parent
03d95cba88
commit
7dc77527ba
10 changed files with 1 additions and 135 deletions
12
src/emap.c
12
src/emap.c
|
|
@ -12,17 +12,7 @@ typedef enum emap_lock_result_e emap_lock_result_t;
|
|||
|
||||
bool
|
||||
emap_init(emap_t *emap, base_t *base, bool zeroed) {
|
||||
bool err;
|
||||
err = rtree_new(&emap->rtree, base, zeroed);
|
||||
if (err) {
|
||||
return true;
|
||||
}
|
||||
err = mutex_pool_init(&emap->mtx_pool, "emap_mutex_pool",
|
||||
WITNESS_RANK_EMAP);
|
||||
if (err) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return rtree_new(&emap->rtree, base, zeroed);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
#include "jemalloc/internal/jemalloc_preamble.h"
|
||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||
|
||||
#include "jemalloc/internal/mutex.h"
|
||||
#include "jemalloc/internal/mutex_pool.h"
|
||||
|
||||
bool
|
||||
mutex_pool_init(mutex_pool_t *pool, const char *name, witness_rank_t rank) {
|
||||
for (int i = 0; i < MUTEX_POOL_SIZE; ++i) {
|
||||
if (malloc_mutex_init(&pool->mutexes[i], name, rank,
|
||||
malloc_mutex_address_ordered)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue