Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 60) sorted by relevance

123

/oneTBB/test/tbbmalloc/
H A Dtest_malloc_overload.cpp88 void __libc_free(void *ptr);
220 free(ptr); in CheckStdFuncOverload()
237 free_p(ptr); in CheckMemalignFuncOverload()
245 free_p(ptr); in CheckVallocFuncOverload()
258 free_p(ptr); in CheckPvalloc()
280 free(ptr); in CheckFreeAligned()
403 void *ptr = nullptr; variable
437 free(ptr);
520 void *ptr = nullptr; in __anon9013b3550102() local
523 ptr = realloc(ptr, 1024*1024 + 4096*j); in __anon9013b3550102()
[all …]
H A Dtest_malloc_compliance.cpp191 MemStruct(void* ptr, UINT sz) : Pointer(ptr), Size(sz) {} in MemStruct()
359 char *ptr = nullptr, in InvariantDataRealloc() local
382 ptr = ptrNew; in InvariantDataRealloc()
391 Trealloc(ptr, 0); in InvariantDataRealloc()
503 void *ptr; member
512 return a->ptr < b->ptr ? -1 : ( a->ptr == b->ptr ? 0 : 1); in cmpAddrs()
531 if (nullptr!=arr[i].ptr && nullptr!=arr[i+1].ptr) in AddrArifm()
553 if (nullptr!=arr[i].ptr && nullptr!=arr[i+1].ptr) in AddrArifm()
572 if (nullptr!=arr[i].ptr && nullptr!=arr[i+1].ptr) in AddrArifm()
617 char *p = (char*)ptr; in myMemset()
[all …]
H A Dtest_malloc_atexit.cpp65 void __libc_free(void *ptr);
66 void *__libc_realloc(void *ptr, size_t size);
69 void free(void *ptr) in free() argument
71 __libc_free(ptr); in free()
74 void *realloc(void *ptr, size_t size) in realloc() argument
76 return __libc_realloc(ptr, size); in realloc()
H A Dtest_malloc_overload_disable.cpp43 void* ptr = malloc(ObjectSize); in CheckWindowsProxyDisablingViaMemSize() local
48 … REQUIRE_MESSAGE(!__TBB_malloc_safer_msize(ptr,nullptr), "Malloc replacement is not deactivated"); in CheckWindowsProxyDisablingViaMemSize()
49 free(ptr); in CheckWindowsProxyDisablingViaMemSize()
H A Dtest_malloc_whitebox.cpp186 void *ptr; member
200 REQUIRE((blocks1[i].ptr && StartupBlock::msize(blocks1[i].ptr)>=blocks1[i].sz in operator ()()
202 memset(blocks1[i].ptr, i, blocks1[i].sz); in operator ()()
207 REQUIRE((blocks2[i].ptr && StartupBlock::msize(blocks2[i].ptr)>=blocks2[i].sz in operator ()()
209 memset(blocks2[i].ptr, i, blocks2[i].sz); in operator ()()
414 MallocPoolHeader *hdr = (MallocPoolHeader*)ptr-1; in putMallocMem()
430 memset(ptr, sz, sz); in operator ()()
431 pool_free(my_mallocPool, ptr); in operator ()()
485 void *ptr = pool_malloc(fixedPool, 1024); in TestPools() local
486 REQUIRE_MESSAGE(ptr, "Memory was not allocated"); in TestPools()
[all …]
/oneTBB/src/tbbmalloc_proxy/
H A Dproxy.cpp234 size_t malloc_usable_size(void *ptr) __THROW in malloc_usable_size()
294 void __libc_free(void *ptr) in __libc_free() argument
317 void operator delete(void* ptr) noexcept { in operator delete() argument
357 void __TBB_malloc_safer_delete( void *ptr) in __TBB_malloc_safer_delete() argument
413 void __TBB_malloc__o_free(void *ptr) in __TBB_malloc__o_free() argument
419 void __TBB_malloc__free_base(void *ptr) in __TBB_malloc__free_base() argument
537 void operator_delete(void* ptr) noexcept { in operator_delete() argument
538 __TBB_malloc_safer_delete(ptr); in operator_delete()
545 __TBB_malloc_safer_delete(ptr); in operator_delete_arr()
554 __TBB_malloc_safer_delete(ptr); in operator_delete_t()
[all …]
H A Dproxy_overload_osx.h94 static size_t impl_malloc_usable_size(struct _malloc_zone_t *, const void *ptr) in impl_malloc_usable_size() argument
98 return __TBB_malloc_safer_msize(const_cast<void*>(ptr), nullptr); in impl_malloc_usable_size()
104 static void impl_free(struct _malloc_zone_t *, void *ptr);
105 static void *impl_realloc(struct _malloc_zone_t *, void *ptr, size_t size);
109 static void impl_free_definite_size(struct _malloc_zone_t*, void *ptr, size_t size) in impl_free_definite_size() argument
111 __TBB_malloc_free_definite_size(ptr, size); in impl_free_definite_size()
158 void* ptr = malloc(1); in DoMallocReplacement() local
167 if (z && z->size(z,ptr)>0) { // the right one is found in DoMallocReplacement()
173 free(ptr); in DoMallocReplacement()
H A Dproxy.h33 TBBMALLOC_EXPORT void __TBB_malloc_safer_free( void *ptr, void (*original_free)(void*));
34 TBBMALLOC_EXPORT void * __TBB_malloc_safer_realloc( void *ptr, size_t, void* );
35 TBBMALLOC_EXPORT void * __TBB_malloc_safer_aligned_realloc( void *ptr, size_t, size_t, void* );
36 … TBBMALLOC_EXPORT size_t __TBB_malloc_safer_msize( void *ptr, size_t (*orig_msize_crt80d)(void*));
37 …TBBMALLOC_EXPORT size_t __TBB_malloc_safer_aligned_msize( void *ptr, size_t, size_t, size_t (*orig…
H A Dfunction_replacement.h52 inline UINT_PTR Ptr2Addrint(LPVOID ptr);
53 inline LPVOID Addrint2Ptr(UINT_PTR ptr);
/oneTBB/examples/parallel_for/tachyon/src/
H A Dimap.cpp78 unsigned char *ptr; in ImageMap() local
99 ptr = image->data + ((image->xres * y1) + x1) * 3; in ImageMap()
102 colx.r = (flt)((flt)ptr[0] + px * ((flt)ptr2[0] - (flt)ptr[0])) / 255.0; in ImageMap()
103 colx.g = (flt)((flt)ptr[1] + px * ((flt)ptr2[1] - (flt)ptr[1])) / 255.0; in ImageMap()
104 colx.b = (flt)((flt)ptr[2] + px * ((flt)ptr2[2] - (flt)ptr[2])) / 255.0; in ImageMap()
106 ptr = image->data + ((image->xres * y2) + x1) * 3; in ImageMap()
109 colx2.r = ((flt)ptr[0] + px * ((flt)ptr2[0] - (flt)ptr[0])) / 255.0; in ImageMap()
110 colx2.g = ((flt)ptr[1] + px * ((flt)ptr2[1] - (flt)ptr[1])) / 255.0; in ImageMap()
111 colx2.b = ((flt)ptr[2] + px * ((flt)ptr2[2] - (flt)ptr[2])) / 255.0; in ImageMap()
/oneTBB/examples/graph/fgbzip2/
H A Dblocksort.cpp659 ptr[j] = ptr[j - h]; in mainSimpleSort()
673 ptr[j] = ptr[j - h]; in mainSimpleSort()
687 ptr[j] = ptr[j - h]; in mainSimpleSort()
723 mswap(ptr[yyp1], ptr[yyp2]); \
816 med = (Int32)mmed3(block[ptr[lo] + d], block[ptr[hi] + d], block[ptr[(lo + hi) >> 1] + d]); in mainQSort3()
827 mswap(ptr[unLo], ptr[ltLo]); in mainQSort3()
841 mswap(ptr[unHi], ptr[gtHi]); in mainQSort3()
852 mswap(ptr[unLo], ptr[unHi]); in mainQSort3()
991 ptr[j] = i; in mainSort()
1009 ptr[j] = i; in mainSort()
[all …]
/oneTBB/include/oneapi/tbb/detail/
H A D_small_object_pool.h43 TBB_EXPORT void __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& pool, void* ptr, std::size_t…
45 TBB_EXPORT void __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& pool, void* ptr, std::size_t…
86 void deallocate(Type* ptr, const execution_data& ed) { in deallocate() argument
87 call_itt_task_notify(destroy, ptr); in deallocate()
90 r1::deallocate(*m_pool, ptr, sizeof(Type), ed); in deallocate()
94 void deallocate(Type* ptr) { in deallocate() argument
95 call_itt_task_notify(destroy, ptr); in deallocate()
98 r1::deallocate(*m_pool, ptr, sizeof(Type)); in deallocate()
/oneTBB/src/tbb/
H A Dsmall_object_pool.cpp73 void __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& allocator, void* ptr, std::size_t number… in deallocate() argument
76 pool->deallocate_impl(ptr, number_of_bytes, *tls); in deallocate()
79 void __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& allocator, void* ptr, std::size_t number… in deallocate() argument
82 pool->deallocate_impl(ptr, number_of_bytes, tls); in deallocate()
85 void small_object_pool_impl::deallocate_impl(void* ptr, std::size_t number_of_bytes, thread_data& t… in deallocate_impl() argument
86 __TBB_ASSERT(ptr != nullptr, "pointer to deallocate should not be null"); in deallocate_impl()
90 auto obj = new (ptr) small_object{nullptr}; in deallocate_impl()
115 cache_aligned_deallocate(ptr); in deallocate_impl()
H A Dprofiling.cpp104 void create_itt_sync(void* ptr, const tchar* objtype, const tchar* objname) { in create_itt_sync() argument
105 ITT_SYNC_CREATE(ptr, objtype, objname); in create_itt_sync()
108 void call_itt_notify(int t, void *ptr) { in call_itt_notify() argument
110 case 0: ITT_NOTIFY(sync_prepare, ptr); break; in call_itt_notify()
111 case 1: ITT_NOTIFY(sync_cancel, ptr); break; in call_itt_notify()
112 case 2: ITT_NOTIFY(sync_acquired, ptr); break; in call_itt_notify()
113 case 3: ITT_NOTIFY(sync_releasing, ptr); break; in call_itt_notify()
114 case 4: ITT_NOTIFY(sync_destroy, ptr); break; in call_itt_notify()
/oneTBB/src/tbbmalloc/
H A Dfrontend.cpp104 void free(void* ptr);
1843 static size_t msize(void *ptr) { return *((size_t*)ptr - 1); } in msize() argument
2527 (isLargeObject<unknownMem>(ptr) || isSmallObject(ptr)); in isRecognized()
2784 if (!ptr) in pool_aligned_realloc()
2943 return ptr; in scalable_malloc()
3001 if (!ptr) in scalable_realloc()
3021 if (!ptr) { in __TBB_malloc_safer_realloc()
3126 if (!ptr) in scalable_aligned_realloc()
3147 if (!ptr) { in __TBB_malloc_safer_aligned_realloc()
3192 internalFree(ptr); in scalable_aligned_free()
[all …]
H A DCustomize.h100 inline void call_itt_notify(notify_type t, void *ptr) { in call_itt_notify() argument
102 detail::suppress_unused_warning(ptr); in call_itt_notify()
105 MALLOC_ITT_SYNC_PREPARE( ptr ); in call_itt_notify()
108 MALLOC_ITT_SYNC_CANCEL( ptr ); in call_itt_notify()
111 MALLOC_ITT_SYNC_ACQUIRED( ptr ); in call_itt_notify()
114 MALLOC_ITT_SYNC_RELEASING( ptr ); in call_itt_notify()
H A Dbackend.h218 bool inRange(void *ptr) const { in inRange() argument
219 const uintptr_t p = (uintptr_t)ptr; in inRange()
361 void *remap(void *ptr, size_t oldSize, size_t newSize, size_t alignment);
365 bool ptrCanBeValid(void *ptr) const { return usedAddrRange.inRange(ptr); } in ptrCanBeValid() argument
/oneTBB/test/common/
H A Dcustom_allocators.h80 char* p = reinterpret_cast<char*>(ptr); in deallocate()
168 return ptr; in allocate()
178 void construct( U* ptr, Args&&... args ) { in construct() argument
184 void destroy( U* ptr ) { in destroy() argument
185 base_traits::destroy(*this, ptr); in destroy()
279 return ptr; in allocate()
289 void construct( U* ptr, Args&&... args ) { in construct() argument
295 void destroy( U* ptr ) { in destroy() argument
297 base_traits::destroy(*this, ptr); in destroy()
431 void destroy( U* ptr ) { in destroy() argument
[all …]
H A Diterator.h41 …explicit InputIterator ( T * ptr ) : my_ptr(ptr), my_shared_epoch(new Epoch), my_current_epoch(0) … in InputIterator() argument
122 explicit ForwardIterator ( T * ptr ) : my_ptr(ptr){} in ForwardIterator() argument
149 explicit RandomIterator ( T * ptr ) : my_ptr(ptr){} in RandomIterator() argument
207 explicit ConstRandomIterator ( const T * ptr ) : my_ptr(ptr){} in ConstRandomIterator() argument
/oneTBB/include/oneapi/tbb/
H A Dprofiling.h73 TBB_EXPORT void __TBB_EXPORTED_FUNC call_itt_notify(int t, void* ptr);
74 …TBB_EXPORT void __TBB_EXPORTED_FUNC create_itt_sync(void* ptr, const tchar* objtype, const tchar* …
102 inline void create_itt_sync(void *ptr, const char *objtype, const char *objname) { in create_itt_sync() argument
114 r1::create_itt_sync(ptr, type, name); in create_itt_sync()
124 inline void call_itt_task_notify(d1::notify_type t, void *ptr) { in call_itt_task_notify() argument
125 r1::call_itt_notify(static_cast<int>(t), ptr); in call_itt_task_notify()
131 inline void call_itt_notify(d1::notify_type t, void *ptr) { in call_itt_notify() argument
132 r1::call_itt_notify(static_cast<int>(t), ptr); in call_itt_notify()
H A Dscalable_allocator.h55 TBBMALLOC_EXPORT void __TBB_EXPORTED_FUNC scalable_free(void* ptr);
59 TBBMALLOC_EXPORT void* __TBB_EXPORTED_FUNC scalable_realloc(void* ptr, size_t size);
75 TBBMALLOC_EXPORT void* __TBB_EXPORTED_FUNC scalable_aligned_realloc(void* ptr, size_t size, size_t …
79 TBBMALLOC_EXPORT void __TBB_EXPORTED_FUNC scalable_aligned_free(void* ptr);
85 TBBMALLOC_EXPORT size_t __TBB_EXPORTED_FUNC scalable_msize(void* ptr);
189 TBBMALLOC_EXPORT void *pool_aligned_realloc(MemoryPool* mPool, void *ptr, std::size_t size, std::si…
297 void do_deallocate(void* ptr, std::size_t /*bytes*/, std::size_t /*alignment*/) override { in do_deallocate() argument
298 scalable_free(ptr); in do_deallocate()
H A Dmemory_pool.h54 void free(void* ptr) { rml::pool_free(my_pool, ptr); } in free() argument
58 void *realloc(void* ptr, size_t size) { in realloc() argument
59 return rml::pool_realloc(my_pool, ptr, size); in realloc()
215 void *ptr; in allocate_request() local
219 ptr = self.my_alloc.allocate( bytes/unit_size ); in allocate_request()
225 return ptr; in allocate_request()
/oneTBB/src/tbb/tools_api/
H A Dittnotify_config.h293 __itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;
294 ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) in __itt_interlocked_increment() argument
296 return InterlockedIncrement(ptr); in __itt_interlocked_increment()
303 return InterlockedCompareExchange(ptr, exchange, comperand); in __itt_interlocked_compare_exchange()
372 ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) in __TBB_machine_fetchadd4() argument
376 : "=r"(result),"=m"(*(volatile int*)ptr) in __TBB_machine_fetchadd4()
377 : "0"(addend), "m"(*(volatile int*)ptr) in __TBB_machine_fetchadd4()
386 __itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;
387 ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) in __itt_interlocked_increment() argument
389 return __TBB_machine_fetchadd4(ptr, 1) + 1L; in __itt_interlocked_increment()
[all …]
/oneTBB/doc/main/reference/
H A Dscalable_memory_pools.rst26 * - \ ``void P::free(void* ptr);``
27 - Frees the memory object specified via ``ptr`` pointer.
28 * - \ ``void* P::realloc(void* ptr, size_t n);``
29 - Reallocates the memory object pointed by ``ptr`` to ``n`` bytes.
/oneTBB/test/tbb/
H A Dtest_scheduler_mix.cpp81 void* ptr{}; in aligned_malloc()
82 int res = posix_memalign(&ptr, alignment, size); in aligned_malloc()
84 return ptr; in aligned_malloc()
90 void aligned_free(void* ptr) { in aligned_free() argument
92 _aligned_free(ptr); in aligned_free()
94 free(ptr); in aligned_free()
179 bool trySet(T* ptr) { in trySet() argument
180 auto p = reinterpret_cast<std::uintptr_t>(ptr); in trySet()

123