Home
last modified time | relevance | path

Searched refs:arena (Results 1 – 25 of 246) sorted by relevance

12345678910

/external/jemalloc_new/src/
Darena.c51 static void arena_decay_to_limit(tsdn_t *tsdn, arena_t *arena,
54 static bool arena_decay_dirty(tsdn_t *tsdn, arena_t *arena,
56 static void arena_dalloc_bin_slab(tsdn_t *tsdn, arena_t *arena, extent_t *slab,
58 static void arena_bin_lower_slab(tsdn_t *tsdn, arena_t *arena, extent_t *slab,
64 arena_basic_stats_merge(UNUSED tsdn_t *tsdn, arena_t *arena, unsigned *nthreads, in arena_basic_stats_merge() argument
67 *nthreads += arena_nthreads_get(arena, false); in arena_basic_stats_merge()
68 *dss = dss_prec_names[arena_dss_prec_get(arena)]; in arena_basic_stats_merge()
69 *dirty_decay_ms = arena_dirty_decay_ms_get(arena); in arena_basic_stats_merge()
70 *muzzy_decay_ms = arena_muzzy_decay_ms_get(arena); in arena_basic_stats_merge()
71 *nactive += atomic_load_zu(&arena->nactive, ATOMIC_RELAXED); in arena_basic_stats_merge()
[all …]
Dlarge.c14 large_malloc(tsdn_t *tsdn, arena_t *arena, size_t usize, bool zero) { in large_malloc() argument
17 return large_palloc(tsdn, arena, usize, CACHELINE, zero); in large_malloc()
21 large_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize, size_t alignment, in large_palloc() argument
28 assert(!tsdn_null(tsdn) || arena != NULL); in large_palloc()
50 arena = arena_get(tsdn, 0, false); in large_palloc()
52 arena = arena_choose(tsdn_tsd(tsdn), arena); in large_palloc()
55 if (unlikely(arena == NULL) || (extent = arena_extent_alloc_large(tsdn, in large_palloc()
56 arena, usize, alignment, &is_zeroed)) == NULL) { in large_palloc()
61 if (!arena_is_auto(arena)) { in large_palloc()
63 malloc_mutex_lock(tsdn, &arena->large_mtx); in large_palloc()
[all …]
Dextent.c34 static bool extent_commit_impl(tsdn_t *tsdn, arena_t *arena,
43 static bool extent_purge_lazy_impl(tsdn_t *tsdn, arena_t *arena,
50 static bool extent_purge_forced_impl(tsdn_t *tsdn, arena_t *arena,
58 static extent_t *extent_split_impl(tsdn_t *tsdn, arena_t *arena,
67 static bool extent_merge_impl(tsdn_t *tsdn, arena_t *arena,
109 static extent_t *extent_recycle(tsdn_t *tsdn, arena_t *arena,
113 static extent_t *extent_try_coalesce(tsdn_t *tsdn, arena_t *arena,
116 static void extent_record(tsdn_t *tsdn, arena_t *arena,
177 extent_alloc(tsdn_t *tsdn, arena_t *arena) { in extent_alloc() argument
178 malloc_mutex_lock(tsdn, &arena->extent_avail_mtx); in extent_alloc()
[all …]
Dandroid_je_mallinfo.c17 static size_t accumulate_large_allocs(arena_t* arena) { in accumulate_large_allocs() argument
26 …uint64_t ndalloc = arena_stats_read_u64(TSDN_NULL, &arena->stats, &arena->stats.lstats[j].ndalloc); in accumulate_large_allocs()
27 …uint64_t nmalloc = arena_stats_read_u64(TSDN_NULL, &arena->stats, &arena->stats.lstats[j].nmalloc); in accumulate_large_allocs()
34 static size_t accumulate_small_allocs(arena_t* arena) { in accumulate_small_allocs() argument
37 bin_t* bin = &arena->bins[j]; in accumulate_small_allocs()
57 arena_t* arena = atomic_load_p(&arenas[i], ATOMIC_ACQUIRE); in je_mallinfo() local
58 if (arena != NULL) { in je_mallinfo()
59 mi.hblkhd += atomic_load_zu(&arena->stats.mapped, ATOMIC_ACQUIRE); in je_mallinfo()
61 mi.uordblks += accumulate_small_allocs(arena); in je_mallinfo()
62 mi.uordblks += accumulate_large_allocs(arena); in je_mallinfo()
[all …]
Dtcache.c92 tcache_alloc_small_hard(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache, in tcache_alloc_small_hard() argument
96 assert(tcache->arena != NULL); in tcache_alloc_small_hard()
97 arena_tcache_fill_small(tsdn, arena, tcache, tbin, binind, in tcache_alloc_small_hard()
115 arena_t *arena = tcache->arena; in tcache_bin_flush_small() local
116 assert(arena != NULL); in tcache_bin_flush_small()
130 if (config_prof && bin_arena == arena) { in tcache_bin_flush_small()
131 if (arena_prof_accum(tsd_tsdn(tsd), arena, in tcache_bin_flush_small()
139 if (config_stats && bin_arena == arena) { in tcache_bin_flush_small()
178 bin_t *bin = &arena->bins[binind]; in tcache_bin_flush_small()
206 arena_t *arena = tcache->arena; in tcache_bin_flush_large() local
[all …]
/external/jemalloc/src/
Darena.c33 static void arena_chunk_dalloc(tsdn_t *tsdn, arena_t *arena,
35 static void arena_purge_to_limit(tsdn_t *tsdn, arena_t *arena,
37 static void arena_run_dalloc(tsdn_t *tsdn, arena_t *arena, arena_run_t *run,
39 static void arena_dalloc_bin_run(tsdn_t *tsdn, arena_t *arena,
41 static void arena_bin_lower_run(arena_t *arena, arena_run_t *run,
186 arena_avail_insert(arena_t *arena, arena_chunk_t *chunk, size_t pageind, in arena_avail_insert() argument
195 arena_run_heap_insert(&arena->runs_avail[pind], in arena_avail_insert()
200 arena_avail_remove(arena_t *arena, arena_chunk_t *chunk, size_t pageind, in arena_avail_remove() argument
209 arena_run_heap_remove(&arena->runs_avail[pind], in arena_avail_remove()
214 arena_run_dirty_insert(arena_t *arena, arena_chunk_t *chunk, size_t pageind, in arena_run_dirty_insert() argument
[all …]
Dchunk.c52 static void chunk_record(tsdn_t *tsdn, arena_t *arena,
60 chunk_hooks_get_locked(arena_t *arena) in chunk_hooks_get_locked() argument
63 return (arena->chunk_hooks); in chunk_hooks_get_locked()
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()
72 chunk_hooks = chunk_hooks_get_locked(arena); 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()
84 old_chunk_hooks = arena->chunk_hooks; in chunk_hooks_set()
[all …]
Dhuge.c43 huge_malloc(tsdn_t *tsdn, arena_t *arena, size_t usize, bool zero) in huge_malloc() argument
48 return (huge_palloc(tsdn, arena, usize, chunksize, zero)); in huge_malloc()
52 huge_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize, size_t alignment, in huge_palloc() argument
64 assert(!tsdn_null(tsdn) || arena != NULL); in huge_palloc()
92 arena = a0get(); in huge_palloc()
94 arena = arena_choose(tsdn_tsd(tsdn), arena); in huge_palloc()
98 if (unlikely(arena == NULL) || (ret = arena_chunk_alloc_huge(tsdn, in huge_palloc()
99 arena, usize, alignment, &sn, &is_zeroed)) == NULL) { in huge_palloc()
104 extent_node_init(node, arena, ret, usize, sn, is_zeroed, true); in huge_palloc()
107 arena_chunk_dalloc_huge(tsdn, arena, ret, usize, sn); in huge_palloc()
[all …]
Dtcache.c77 tcache_alloc_small_hard(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache, in tcache_alloc_small_hard() argument
82 arena_tcache_fill_small(tsdn, arena, tbin, binind, config_prof ? in tcache_alloc_small_hard()
95 arena_t *arena; in tcache_bin_flush_small() local
103 arena = arena_choose(tsd, NULL); in tcache_bin_flush_small()
104 assert(arena != NULL); in tcache_bin_flush_small()
112 if (config_prof && bin_arena == arena) { in tcache_bin_flush_small()
113 if (arena_prof_accum(tsd_tsdn(tsd), arena, in tcache_bin_flush_small()
120 if (config_stats && bin_arena == arena) { in tcache_bin_flush_small()
158 arena_bin_t *bin = &arena->bins[binind]; in tcache_bin_flush_small()
177 arena_t *arena; in tcache_bin_flush_large() local
[all …]
/external/python/cpython3/Python/
Dpyarena.c130 PyArena* arena = (PyArena *)PyMem_Malloc(sizeof(PyArena)); in PyArena_New() local
131 if (!arena) in PyArena_New()
134 arena->a_head = block_new(DEFAULT_BLOCK_SIZE); in PyArena_New()
135 arena->a_cur = arena->a_head; in PyArena_New()
136 if (!arena->a_head) { in PyArena_New()
137 PyMem_Free((void *)arena); in PyArena_New()
140 arena->a_objects = PyList_New(0); in PyArena_New()
141 if (!arena->a_objects) { in PyArena_New()
142 block_free(arena->a_head); in PyArena_New()
143 PyMem_Free((void *)arena); in PyArena_New()
[all …]
DPython-ast.c739 static int obj2ast_singleton(PyObject *obj, PyObject** out, PyArena* arena) in obj2ast_singleton() argument
750 static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_object() argument
755 if (PyArena_AddPyObject(arena, obj) < 0) { in obj2ast_object()
765 static int obj2ast_constant(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_constant() argument
768 if (PyArena_AddPyObject(arena, obj) < 0) { in obj2ast_constant()
778 static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_identifier() argument
784 return obj2ast_object(obj, out, arena); in obj2ast_identifier()
787 static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_string() argument
793 return obj2ast_object(obj, out, arena); in obj2ast_string()
796 static int obj2ast_bytes(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_bytes() argument
[all …]
/external/python/cpython2/Python/
Dpyarena.c133 PyArena* arena = (PyArena *)malloc(sizeof(PyArena)); in PyArena_New() local
134 if (!arena) in PyArena_New()
137 arena->a_head = block_new(DEFAULT_BLOCK_SIZE); in PyArena_New()
138 arena->a_cur = arena->a_head; in PyArena_New()
139 if (!arena->a_head) { in PyArena_New()
140 free((void *)arena); in PyArena_New()
143 arena->a_objects = PyList_New(0); in PyArena_New()
144 if (!arena->a_objects) { in PyArena_New()
145 block_free(arena->a_head); in PyArena_New()
146 free((void *)arena); in PyArena_New()
[all …]
DPython-ast.c586 static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_object() argument
591 PyArena_AddPyObject(arena, obj); in obj2ast_object()
597 static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_identifier() argument
604 return obj2ast_object(obj, out, arena); in obj2ast_identifier()
607 static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena) in obj2ast_string() argument
614 return obj2ast_object(obj, out, arena); in obj2ast_string()
617 static int obj2ast_int(PyObject* obj, int* out, PyArena* arena) in obj2ast_int() argument
636 static int obj2ast_bool(PyObject* obj, bool* out, PyArena* arena) in obj2ast_bool() argument
969 static int obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena);
970 static int obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena);
[all …]
/external/tensorflow/tensorflow/lite/
Dsimple_memory_arena_test.cc26 SimpleMemoryArena arena(64); in TEST() local
29 arena.Allocate(&context, 32, 2047, &allocs[0]); in TEST()
30 arena.Allocate(&context, 32, 2047, &allocs[1]); in TEST()
31 arena.Allocate(&context, 32, 2047, &allocs[2]); in TEST()
32 arena.Deallocate(&context, allocs[0]); in TEST()
33 arena.Allocate(&context, 32, 1023, &allocs[3]); in TEST()
34 arena.Allocate(&context, 32, 2047, &allocs[4]); in TEST()
35 arena.Deallocate(&context, allocs[1]); in TEST()
36 arena.Allocate(&context, 32, 1023, &allocs[5]); in TEST()
48 SimpleMemoryArena arena(64); in TEST() local
[all …]
/external/grpc-grpc/src/core/lib/gpr/
Darena.cc47 gpr_arena* arena = (gpr_arena*)gpr_zalloc(sizeof(*arena)); in gpr_arena_create() local
48 gpr_mu_init(&arena->mu); in gpr_arena_create()
49 return arena; in gpr_arena_create()
52 size_t gpr_arena_destroy(gpr_arena* arena) { in gpr_arena_destroy() argument
53 gpr_mu_destroy(&arena->mu); in gpr_arena_destroy()
54 for (size_t i = 0; i < arena->num_ptrs; ++i) { in gpr_arena_destroy()
55 gpr_free(arena->ptrs[i]); in gpr_arena_destroy()
57 gpr_free(arena->ptrs); in gpr_arena_destroy()
58 gpr_free(arena); in gpr_arena_destroy()
62 void* gpr_arena_alloc(gpr_arena* arena, size_t size) { in gpr_arena_alloc() argument
[all …]
/external/jemalloc_new/include/jemalloc/internal/
Darena_externs.h19 void arena_basic_stats_merge(tsdn_t *tsdn, arena_t *arena,
22 void arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads,
26 void arena_extents_dirty_dalloc(tsdn_t *tsdn, arena_t *arena,
31 extent_t *arena_extent_alloc_large(tsdn_t *tsdn, arena_t *arena,
33 void arena_extent_dalloc_large_prep(tsdn_t *tsdn, arena_t *arena,
35 void arena_extent_ralloc_large_shrink(tsdn_t *tsdn, arena_t *arena,
37 void arena_extent_ralloc_large_expand(tsdn_t *tsdn, arena_t *arena,
39 ssize_t arena_dirty_decay_ms_get(arena_t *arena);
40 bool arena_dirty_decay_ms_set(tsdn_t *tsdn, arena_t *arena, ssize_t decay_ms);
41 ssize_t arena_muzzy_decay_ms_get(arena_t *arena);
[all …]
Dextent_externs.h15 extent_t *extent_alloc(tsdn_t *tsdn, arena_t *arena);
16 void extent_dalloc(tsdn_t *tsdn, arena_t *arena, extent_t *extent);
18 extent_hooks_t *extent_hooks_get(arena_t *arena);
19 extent_hooks_t *extent_hooks_set(tsd_t *tsd, arena_t *arena,
34 extent_t *extents_alloc(tsdn_t *tsdn, arena_t *arena,
38 void extents_dalloc(tsdn_t *tsdn, arena_t *arena,
40 extent_t *extents_evict(tsdn_t *tsdn, arena_t *arena,
45 extent_t *extent_alloc_wrapper(tsdn_t *tsdn, arena_t *arena,
48 void extent_dalloc_gap(tsdn_t *tsdn, arena_t *arena, extent_t *extent);
49 void extent_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena,
[all …]
Djemalloc_internal_inlines_b.h8 arena_choose_impl(tsd_t *tsd, arena_t *arena, bool internal) { in arena_choose_impl() argument
11 if (arena != NULL) { in arena_choose_impl()
12 return arena; in arena_choose_impl()
26 if (tcache->arena != NULL) { in arena_choose_impl()
28 assert(tcache->arena == in arena_choose_impl()
30 if (tcache->arena != ret) { in arena_choose_impl()
62 arena_choose(tsd_t *tsd, arena_t *arena) { in arena_choose() argument
63 return arena_choose_impl(tsd, arena, false); in arena_choose()
67 arena_ichoose(tsd_t *tsd, arena_t *arena) { in arena_ichoose() argument
68 return arena_choose_impl(tsd, arena, true); in arena_ichoose()
[all …]
/external/skqp/tests/
DArenaAllocTest.cpp76 SkArenaAlloc arena{0}; in DEF_TEST() local
77 REPORTER_ASSERT(r, *arena.make<int>(3) == 3); in DEF_TEST()
78 Foo* foo = arena.make<Foo>(3, 4.0f); in DEF_TEST()
83 arena.makeArrayDefault<int>(10); in DEF_TEST()
84 int* zeroed = arena.makeArray<int>(10); in DEF_TEST()
88 Foo* fooArray = arena.makeArrayDefault<Foo>(10); in DEF_TEST()
93 arena.make<typename std::aligned_storage<10,8>::type>(); in DEF_TEST()
101 SkSTArenaAlloc<64> arena; in DEF_TEST() local
103 REPORTER_ASSERT(r, *arena.make<int>(3) == 3); in DEF_TEST()
104 Foo* foo = arena.make<Foo>(3, 4.0f); in DEF_TEST()
[all …]
/external/skia/tests/
DArenaAllocTest.cpp76 SkArenaAlloc arena{0}; in DEF_TEST() local
77 REPORTER_ASSERT(r, *arena.make<int>(3) == 3); in DEF_TEST()
78 Foo* foo = arena.make<Foo>(3, 4.0f); in DEF_TEST()
83 arena.makeArrayDefault<int>(10); in DEF_TEST()
84 int* zeroed = arena.makeArray<int>(10); in DEF_TEST()
88 Foo* fooArray = arena.makeArrayDefault<Foo>(10); in DEF_TEST()
93 arena.make<typename std::aligned_storage<10,8>::type>(); in DEF_TEST()
101 SkSTArenaAlloc<64> arena; in DEF_TEST() local
103 REPORTER_ASSERT(r, *arena.make<int>(3) == 3); in DEF_TEST()
104 Foo* foo = arena.make<Foo>(3, 4.0f); in DEF_TEST()
[all …]
/external/protobuf/src/google/protobuf/
Darena_unittest.cc164 Arena arena; in TEST() local
165 EXPECT_TRUE(Arena::Create<int32>(&arena) != NULL); in TEST()
166 EXPECT_TRUE(Arena::Create<int64>(&arena) != NULL); in TEST()
167 EXPECT_TRUE(Arena::Create<float>(&arena) != NULL); in TEST()
168 EXPECT_TRUE(Arena::Create<double>(&arena) != NULL); in TEST()
169 EXPECT_TRUE(Arena::Create<string>(&arena) != NULL); in TEST()
170 arena.Own(new int32); in TEST()
171 arena.Own(new int64); in TEST()
172 arena.Own(new float); in TEST()
173 arena.Own(new double); in TEST()
[all …]
Darena.h128 void* (*on_arena_init)(Arena* arena);
129 void (*on_arena_reset)(Arena* arena, void* cookie, uint64 space_used);
130 void (*on_arena_destruction)(Arena* arena, void* cookie, uint64 space_used);
250 static T* CreateMessage(::google::protobuf::Arena* arena) { in CreateMessage() argument
251 if (arena == NULL) { in CreateMessage()
254 return arena->CreateMessageInternal<T>(static_cast<T*>(0)); in CreateMessage()
262 static T* CreateMessage(::google::protobuf::Arena* arena, const Arg& arg) { in CreateMessage() argument
263 if (arena == NULL) { in CreateMessage()
266 return arena->CreateMessageInternal<T>(static_cast<T*>(0), in CreateMessage()
275 static T* CreateMessage(::google::protobuf::Arena* arena, in CreateMessage() argument
[all …]
/external/python/cpython2/Include/
DPython-ast.h376 mod_ty _Py_Module(asdl_seq * body, PyArena *arena);
378 mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena);
380 mod_ty _Py_Expression(expr_ty body, PyArena *arena);
382 mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
386 PyArena *arena);
390 PyArena *arena);
392 stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, PyArena *arena);
395 *arena);
398 col_offset, PyArena *arena);
401 lineno, int col_offset, PyArena *arena);
[all …]
/external/python/cpython3/Include/
DPython-ast.h443 mod_ty _Py_Module(asdl_seq * body, PyArena *arena);
445 mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena);
447 mod_ty _Py_Expression(expr_ty body, PyArena *arena);
449 mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
453 int col_offset, PyArena *arena);
457 int lineno, int col_offset, PyArena *arena);
461 int col_offset, PyArena *arena);
463 stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, PyArena *arena);
466 *arena);
469 col_offset, PyArena *arena);
[all …]
/external/jemalloc/include/jemalloc/internal/
Darena.h543 void arena_chunk_cache_maybe_insert(arena_t *arena, extent_node_t *node,
545 void arena_chunk_cache_maybe_remove(arena_t *arena, extent_node_t *node,
547 extent_node_t *arena_node_alloc(tsdn_t *tsdn, arena_t *arena);
548 void arena_node_dalloc(tsdn_t *tsdn, arena_t *arena, extent_node_t *node);
549 void *arena_chunk_alloc_huge(tsdn_t *tsdn, arena_t *arena, size_t usize,
551 void arena_chunk_dalloc_huge(tsdn_t *tsdn, arena_t *arena, void *chunk,
553 void arena_chunk_ralloc_huge_similar(tsdn_t *tsdn, arena_t *arena,
555 void arena_chunk_ralloc_huge_shrink(tsdn_t *tsdn, arena_t *arena,
557 bool arena_chunk_ralloc_huge_expand(tsdn_t *tsdn, arena_t *arena,
559 ssize_t arena_lg_dirty_mult_get(tsdn_t *tsdn, arena_t *arena);
[all …]

12345678910