Lines Matching refs:tsdn
52 static void chunk_record(tsdn_t *tsdn, arena_t *arena,
67 chunk_hooks_get(tsdn_t *tsdn, arena_t *arena) in chunk_hooks_get() argument
71 malloc_mutex_lock(tsdn, &arena->chunks_mtx); in chunk_hooks_get()
73 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_hooks_get()
79 chunk_hooks_set(tsdn_t *tsdn, arena_t *arena, const chunk_hooks_t *chunk_hooks) in chunk_hooks_set() argument
83 malloc_mutex_lock(tsdn, &arena->chunks_mtx); in chunk_hooks_set()
108 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_hooks_set()
114 chunk_hooks_assure_initialized_impl(tsdn_t *tsdn, arena_t *arena, in chunk_hooks_assure_initialized_impl() argument
123 chunk_hooks_get(tsdn, arena); in chunk_hooks_assure_initialized_impl()
128 chunk_hooks_assure_initialized_locked(tsdn_t *tsdn, arena_t *arena, in chunk_hooks_assure_initialized_locked() argument
132 chunk_hooks_assure_initialized_impl(tsdn, arena, chunk_hooks, true); in chunk_hooks_assure_initialized_locked()
136 chunk_hooks_assure_initialized(tsdn_t *tsdn, arena_t *arena, in chunk_hooks_assure_initialized() argument
140 chunk_hooks_assure_initialized_impl(tsdn, arena, chunk_hooks, false); in chunk_hooks_assure_initialized()
144 chunk_register(tsdn_t *tsdn, const void *chunk, const extent_node_t *node) in chunk_register() argument
164 prof_gdump(tsdn); in chunk_register()
201 chunk_recycle(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_recycle() argument
226 malloc_mutex_lock(tsdn, &arena->chunks_mtx); in chunk_recycle()
227 chunk_hooks_assure_initialized_locked(tsdn, arena, chunk_hooks); in chunk_recycle()
238 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_recycle()
258 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_recycle()
278 arena_node_dalloc(tsdn, arena, node); in chunk_recycle()
279 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_recycle()
280 chunk_record(tsdn, arena, chunk_hooks, chunks_szsnad, in chunk_recycle()
287 node = arena_node_alloc(tsdn, arena); in chunk_recycle()
289 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_recycle()
290 chunk_record(tsdn, arena, chunk_hooks, in chunk_recycle()
304 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_recycle()
305 chunk_record(tsdn, arena, chunk_hooks, chunks_szsnad, chunks_ad, in chunk_recycle()
309 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_recycle()
313 arena_node_dalloc(tsdn, arena, node); in chunk_recycle()
337 chunk_alloc_core(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size, in chunk_alloc_core() argument
349 chunk_alloc_dss(tsdn, arena, new_addr, size, alignment, zero, in chunk_alloc_core()
358 chunk_alloc_dss(tsdn, arena, new_addr, size, alignment, zero, in chunk_alloc_core()
389 chunk_alloc_cache(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_alloc_cache() argument
400 ret = chunk_recycle(tsdn, arena, chunk_hooks, in chunk_alloc_cache()
411 chunk_arena_get(tsdn_t *tsdn, unsigned arena_ind) in chunk_arena_get() argument
415 arena = arena_get(tsdn, arena_ind, false); in chunk_arena_get()
425 chunk_alloc_default_impl(tsdn_t *tsdn, arena_t *arena, void *new_addr, in chunk_alloc_default_impl() argument
430 ret = chunk_alloc_core(tsdn, arena, new_addr, size, alignment, zero, in chunk_alloc_default_impl()
444 tsdn_t *tsdn; in chunk_alloc_default() local
447 tsdn = tsdn_fetch(); in chunk_alloc_default()
448 arena = chunk_arena_get(tsdn, arena_ind); in chunk_alloc_default()
450 return (chunk_alloc_default_impl(tsdn, arena, new_addr, size, alignment, in chunk_alloc_default()
455 chunk_alloc_retained(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_alloc_retained() argument
466 ret = chunk_recycle(tsdn, arena, chunk_hooks, in chunk_alloc_retained()
477 chunk_alloc_wrapper(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_alloc_wrapper() argument
483 chunk_hooks_assure_initialized(tsdn, arena, chunk_hooks); in chunk_alloc_wrapper()
485 ret = chunk_alloc_retained(tsdn, arena, chunk_hooks, new_addr, size, in chunk_alloc_wrapper()
490 ret = chunk_alloc_default_impl(tsdn, arena, new_addr, in chunk_alloc_wrapper()
511 chunk_record(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_record() argument
523 malloc_mutex_lock(tsdn, &arena->chunks_mtx); in chunk_record()
524 chunk_hooks_assure_initialized_locked(tsdn, arena, chunk_hooks); in chunk_record()
551 node = arena_node_alloc(tsdn, arena); in chunk_record()
560 chunk_purge_wrapper(tsdn, arena, chunk_hooks, in chunk_record()
599 arena_node_dalloc(tsdn, arena, prev); in chunk_record()
603 malloc_mutex_unlock(tsdn, &arena->chunks_mtx); in chunk_record()
607 chunk_dalloc_cache(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_dalloc_cache() argument
616 chunk_record(tsdn, arena, chunk_hooks, &arena->chunks_szsnad_cached, in chunk_dalloc_cache()
619 arena_maybe_purge(tsdn, arena); in chunk_dalloc_cache()
640 chunk_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_dalloc_wrapper() argument
650 chunk_hooks_assure_initialized(tsdn, arena, chunk_hooks); in chunk_dalloc_wrapper()
667 chunk_record(tsdn, arena, chunk_hooks, &arena->chunks_szsnad_retained, in chunk_dalloc_wrapper()
709 chunk_purge_wrapper(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks, in chunk_purge_wrapper() argument
713 chunk_hooks_assure_initialized(tsdn, arena, chunk_hooks); in chunk_purge_wrapper()