Home
last modified time | relevance | path

Searched refs:sz (Results 1 – 22 of 22) sorted by relevance

/oneTBB/test/tbbmalloc/
H A Dtest_scalable_allocator.cpp73 void *allocate(size_t sz) { in allocate() argument
74 void *p = cnt_provider_t::allocate(sz); in allocate()
78 void deallocate(void *p, size_t sz) { in deallocate() argument
81 cnt_provider_t::deallocate(std::allocator_traits<cnt_provider_t>::pointer(p), sz); in deallocate()
128 for (size_t sz = 0; sz < 64*1024; sz = sz? 3*sz : 3) { in TestSmallFixedSizePool() local
129 buf = (char*)malloc(sz); in TestSmallFixedSizePool()
132 tbb::fixed_pool pool(buf, sz); in TestSmallFixedSizePool()
139 REQUIRE_MESSAGE(!sz, "expect std::invalid_argument for zero-sized pool only"); in TestSmallFixedSizePool()
151 FixedPool fixedPool(buf, sz); in TestSmallFixedSizePool()
212 for( size_t sz = 10; sz < sizeof(buf); sz *= 2) { variable
[all …]
H A Dtest_malloc_lib_unload.cpp165 for (size_t sz = 1024; sz <= 10*1024 ; sz*=10) { in operator ()() local
166 void *p1 = aligned_malloc_ptr(sz, 16); in operator ()()
167 std::memset(p1, 0, sz); in operator ()()
H A Dtest_malloc_overload.cpp254 for (size_t sz = 0; sz<=largeSz; sz+=largeSz) { in CheckPvalloc() local
255 void *ptr = pvalloc_p(sz); in CheckPvalloc()
256 scalableMallocCheckSize(ptr, sz? alignUp(sz, memoryPageSize) : memoryPageSize); in CheckPvalloc()
267 size_t sz[] = {8, 4*1024, 16*1024, 0}; in CheckFreeAligned() local
270 for (int s=0; sz[s]; s++) in CheckFreeAligned()
274 int ret = posix_memalign(&ptr, align[a], sz[s]); in CheckFreeAligned()
277 ptr = _aligned_malloc(sz[s], align[a]); in CheckFreeAligned()
H A Dtest_malloc_whitebox.cpp85 explicit AllocInfo(int sz) : p((int*)scalable_malloc(sz*sizeof(int))), in AllocInfo() argument
187 size_t sz; member
211 for (size_t j=0; j<blocks1[i].sz; j++) in operator ()()
217 for (size_t j=0; j<blocks2[i].sz; j++) in operator ()()
426 for (size_t sz=minLargeObjectSize; sz<1*1024*1024; in operator ()() local
430 memset(ptr, sz, sz); in operator ()()
1232 for (size_t sz = min_sz; sz <= 64; sz *= 2) { in TestSlabAlignment() local
1233 for (size_t i = 0; i < space/sz; i++) { in TestSlabAlignment()
1234 pointers[i] = scalable_malloc(sz); in TestSlabAlignment()
1241 for (size_t i = 0; i < space/sz; i++) in TestSlabAlignment()
[all …]
H A Dtest_malloc_pools.cpp343 FixedPoolUse(unsigned threads, rml::MemoryPool *p, size_t sz, int it) : in FixedPoolUse() argument
344 pool(p), reqSize(sz), iters(it) { in FixedPoolUse()
387 bool haveEnoughSpace(rml::MemoryPool *pool, size_t sz) in haveEnoughSpace() argument
389 if (void *p = pool_malloc(pool, sz)) { in haveEnoughSpace()
502 for (int sz=500*1024; sz<16*1024*1024; sz+=101*1024) { in TestPoolGranularity() local
503 void *p = pool_malloc(pool, sz); in TestPoolGranularity()
H A Dtest_malloc_compliance.cpp191 MemStruct(void* ptr, UINT sz) : Pointer(ptr), Size(sz) {} in MemStruct()
/oneTBB/src/tbbmalloc_proxy/
H A Dproxy.cpp84 void* res = scalable_malloc(sz); in InternalOperatorNew()
102 res = scalable_malloc(sz); in InternalOperatorNew()
311 void* operator new(size_t sz) { in operator new() argument
314 void* operator new[](size_t sz) { in operator new[]() argument
326 return scalable_malloc(sz); in operator new()
329 return scalable_malloc(sz); in operator new[]()
531 void* operator_new(size_t sz) { in operator_new() argument
548 return scalable_malloc(sz); in operator_new_t()
551 return scalable_malloc(sz); in operator_new_arr_t()
680 char buffer[sz]; in SkipReplacement()
[all …]
/oneTBB/include/oneapi/tbb/detail/
H A D_flow_graph_tagged_buffer_impl.h70 void set_up_free_list( element_type **p_free_list, list_array_type la, size_t sz) { in set_up_free_list() argument
71 for(size_t i=0; i < sz - 1; ++i ) { // construct free list in set_up_free_list()
74 la[sz-1].second = nullptr; in set_up_free_list()
84 DoCleanup(pointer_array_type &pa, list_array_type &my_els, size_t sz) : in DoCleanup()
85 my_pa(&pa), my_elements(&my_els), my_size(sz) { } in DoCleanup()
149 …static void internal_free_buffer( pointer_array_type &pa, list_array_type &el, size_t &sz, size_t … in internal_free_buffer() argument
151 for(size_t i = 0; i < sz; ++i ) { in internal_free_buffer()
163 pointer_array_allocator_type().deallocate(pa, sz); in internal_free_buffer()
169 elements_array_allocator().deallocate(el, sz / 2); in internal_free_buffer()
172 sz = INITIAL_SIZE; in internal_free_buffer()
H A D_concurrent_skip_list.h92 size_type sz = calc_node_size(height); in create() local
94 auto* node = reinterpret_cast<skip_list_node*>(allocator_traits::allocate(alloc, sz)); in create()
112 size_type sz = calc_node_size(node->height()); in destroy() local
117 allocator_traits::deallocate(alloc, reinterpret_cast<std::uint8_t*>(node), sz); in destroy()
H A D_concurrent_unordered_base.h1012 auto sz = my_size.fetch_add(1); in internal_insert() local
1013 adjust_table_size(sz + 1, my_bucket_count.load(std::memory_order_acquire)); in internal_insert()
/oneTBB/test/common/
H A Dutils_report.h150 const int sz = 100; // max number of frames to capture in print_call_stack() local
151 void *buff[sz]; in print_call_stack()
152 int n = backtrace(buff, sz); in print_call_stack()
159 const int sz = 62; // XP limitation for number of frames in print_call_stack() local
160 void *buff[sz]; in print_call_stack()
161 int n = CaptureStackBackTrace(0, sz, buff, nullptr); in print_call_stack()
H A Dcustom_allocators.h33 ArenaData( T* buf, std::size_t sz ) noexcept in ArenaData()
35 my_size(sz * sizeof(T)) in ArenaData()
H A Ddoctest.h658 char* allocate(size_type sz);
663 void setSize(size_type sz) noexcept;
3405 return String(ss, sz);
3651 char* String::allocate(size_type sz) {
3652 if (sz <= last) {
3653 buf[sz] = '\0';
3654 setLast(last - sz);
3658 data.size = sz;
3661 data.ptr[sz] = '\0';
3669 if (isOnStack()) { buf[sz] = '\0'; setLast(last - sz); }
[all …]
/oneTBB/src/tbbmalloc/
H A Dbackend.cpp178 if (sz <= MAX_LOCKED_VAL) { in tryLock()
185 return sz; in tryLock()
227 MALLOC_ASSERT(sz, ASSERT_TEXT); in rightNeig()
231 MALLOC_ASSERT(sz, ASSERT_TEXT); in leftNeig()
240 void setLeftFree(size_t sz) { leftL.unlock(sz); } in setLeftFree() argument
250 setMeFree(sz); in tryLockBlock()
254 return sz; in tryLockBlock()
1477 size_t sz = fb->tryLockBlock(); in reportFreeBlocks() local
1478 fb->setMeFree(sz); in reportFreeBlocks()
1479 fb->rightNeig(sz)->setLeftFree(sz); in reportFreeBlocks()
[all …]
H A Dfrontend.cpp3017 extern "C" TBBMALLOC_EXPORT void* __TBB_malloc_safer_realloc(void* ptr, size_t sz, void* original_r… in __TBB_malloc_safer_realloc() argument
3022 tmp = internalMalloc(sz); in __TBB_malloc_safer_realloc()
3024 if (!sz) { in __TBB_malloc_safer_realloc()
3028 tmp = reallocAligned(defaultMemPool, ptr, sz, 0); in __TBB_malloc_safer_realloc()
3032 else if (original_realloc && sz) { in __TBB_malloc_safer_realloc()
3036 tmp = internalMalloc(sz); in __TBB_malloc_safer_realloc()
3038 memcpy(tmp, ptr, sz<oldSize? sz : oldSize); in __TBB_malloc_safer_realloc()
3051 tmp = original_realloc_ptr(ptr,sz); in __TBB_malloc_safer_realloc()
/oneTBB/test/tbb/
H A Dtest_scheduler_mix.cpp600 int sz = rnd.get() % 10000; in do_it() local
602 auto body = [doGlbAction, sz](int i) { in do_it()
603 if (i == sz / 2 && doGlbAction) { in do_it()
610 tbb::parallel_for(0, sz, body, tbb::simple_partitioner{}); break; in do_it()
612 tbb::parallel_for(0, sz, body, tbb::auto_partitioner{}); break; in do_it()
616 tbb::parallel_for(0, sz, body, aff); break; in do_it()
619 tbb::parallel_for(0, sz, body, tbb::static_partitioner{}); break; in do_it()
H A Dtest_concurrent_vector.cpp196 const typename tbb::concurrent_vector<Type, Allocator>::size_type sz = my_c.size(); in operator ()() local
198 REQUIRE( my_c.size() == sz + 5 ); in operator ()()
199 my_c.resize( sz ); in operator ()()
200 REQUIRE( my_c.size() == sz ); in operator ()()
H A Dtest_concurrent_hash_map.cpp451 int sz = 100; in TestInternalFastFind() local
453 for (int i = 0; i != sz; ++i) { in TestInternalFastFind()
458 for (int i = 0; i != sz; ++i) { in TestInternalFastFind()
466 for (int i = sz; i != 2 * sz; ++i) { in TestInternalFastFind()
/oneTBB/include/oneapi/tbb/
H A Dconcurrent_hash_map.h151 for (size_type i = 0; i < sz; ++i) { in init_buckets_impl()
159 init_buckets_impl(ptr, sz); in init_buckets()
183 size_type sz; variable
186 sz = segment_size(k);
195 init_buckets(ptr, sz, is_initial);
200 sz = segment_size(first_block);
214 my_mask.store(sz-1, std::memory_order_release);
219 size_type sz = segment_size( s ? s : 1 ); in delete_segment() local
224 deallocate_size = sz; in delete_segment()
292 if( sz >= mask ) { // TODO: add custom load_factor in insert_new_node()
[all …]
H A Dconcurrent_priority_queue.h219 size_type sz = my_size.load(std::memory_order_relaxed); in swap() local
221 other.my_size.store(sz, std::memory_order_relaxed); in swap()
235 size_type sz; member
/oneTBB/doc/main/tbb_userguide/
H A Dstd_invoke.rst23 StrideRange(int* s, std::size_t sz, std::size_t str)
24 : start(s), size(sz), stride(str) {}
/oneTBB/test/conformance/
H A Dconformance_concurrent_vector.cpp1133 const typename oneapi::tbb::concurrent_vector<Type, Allocator>::size_type sz = my_c.size(); in operator ()() local
1135 REQUIRE( my_c.size() == sz + 5 ); in operator ()()
1136 my_c.resize( sz ); in operator ()()
1137 REQUIRE( my_c.size() == sz ); in operator ()()