| /oneTBB/src/tbbmalloc/ |
| H A D | MapMemory.h | 55 inline void* mmapTHP(size_t bytes) { in mmapTHP() argument 62 void* result = mmap_impl(bytes, hint); in mmapTHP() 74 munmap(result, bytes); in mmapTHP() 122 result = mmap_impl(bytes); in MapMemory() 134 result = mmapTHP(bytes); in MapMemory() 151 int UnmapMemory(void *area, size_t bytes) in UnmapMemory() argument 154 int ret = munmap(area, bytes); in UnmapMemory() 164 void* MapMemory (size_t bytes, PageType) in MapMemory() argument 178 void *ErrnoPreservingMalloc(size_t bytes) in ErrnoPreservingMalloc() argument 181 void *ret = malloc( bytes ); in ErrnoPreservingMalloc() [all …]
|
| H A D | backref.cpp | 51 …void zeroSet() { memset(static_cast<void*>(this+1), 0, BackRefBlock::bytes-sizeof(BackRefBlock)); } in zeroSet() 52 static const int bytes = slabSize; member 56 static const int BR_MAX_CNT = (BackRefBlock::bytes-sizeof(BackRefBlock))/sizeof(void*); 65 static const size_t bytes = sizeof(uintptr_t)>4? 256*1024 : 8*1024; member 70 static const size_t mainSize = BackRefMain::bytes+leaves*BackRefBlock::bytes; 91 = 1+(BackRefMain::bytes-sizeof(BackRefMain))/sizeof(BackRefBlock*); 111 … BackRefBlock *bl = (BackRefBlock*)((uintptr_t)main + BackRefMain::bytes + i*BackRefBlock::bytes); in initBackRefMain() 162 static_assert(!(blockSpaceSize % BackRefBlock::bytes), in requestNewSpace() 178 bl = (BackRefBlock*)((uintptr_t)bl + BackRefBlock::bytes)) { in requestNewSpace() 191 int blocksToUse = min(numOfUnusedIdxs, blockSpaceSize / BackRefBlock::bytes); in requestNewSpace() [all …]
|
| /oneTBB/examples/parallel_for/tachyon/src/ |
| H A D | util.cpp | 135 void* rt_getmem(unsigned int bytes) { in rt_getmem() argument 138 mem = malloc(bytes); in rt_getmem() 140 rt_mem_in_use += bytes; in rt_getmem() 149 unsigned int bytes; in rt_freemem() local 153 bytes = 0; in rt_freemem() 154 rt_mem_in_use -= bytes; in rt_freemem() 155 return bytes; in rt_freemem()
|
| /oneTBB/include/oneapi/tbb/ |
| H A D | cache_aligned_allocator.h | 121 void* do_allocate(std::size_t bytes, std::size_t alignment) override { in do_allocate() argument 124 std::size_t space = correct_size(bytes) + cache_line_alignment; in do_allocate() 131 __TBB_ASSERT(space - (result - base) >= bytes, "Not enough space for the storage"); in do_allocate() 138 void do_deallocate(void* ptr, std::size_t bytes, std::size_t alignment) override { in do_deallocate() argument 142 …m_upstream->deallocate(reinterpret_cast<void*>(base), correct_size(bytes) + correct_alignment(alig… in do_deallocate() 166 std::size_t correct_size(std::size_t bytes) { in correct_size() argument 169 return bytes < sizeof(std::uintptr_t) ? sizeof(std::uintptr_t) : bytes; in correct_size()
|
| H A D | memory_pool.h | 177 static void *allocate_request(intptr_t pool_id, size_t & bytes); 191 inline static void *allocate_request(intptr_t pool_id, size_t & bytes); 211 void *memory_pool<Alloc>::allocate_request(intptr_t pool_id, size_t & bytes) { in allocate_request() argument 214 __TBBMALLOC_ASSERT( 0 == bytes%unit_size, nullptr); in allocate_request() 219 ptr = self.my_alloc.allocate( bytes/unit_size ); in allocate_request() 253 inline void *fixed_pool::allocate_request(intptr_t pool_id, size_t & bytes) { in allocate_request() argument 256 bytes = self.my_size; in allocate_request()
|
| H A D | scalable_allocator.h | 138 typedef void *(*rawAllocType)(std::intptr_t pool_id, std::size_t &bytes); 289 void* do_allocate(std::size_t bytes, std::size_t alignment) override { in do_allocate() argument 290 void* p = scalable_aligned_malloc(bytes, alignment); in do_allocate()
|
| /oneTBB/src/tbb/ |
| H A D | allocator.cpp | 167 static void* initialize_cache_aligned_allocate_handler(std::size_t bytes, std::size_t alignment) { in initialize_cache_aligned_allocate_handler() argument 170 return (*cache_aligned_allocate_handler)(bytes, alignment); in initialize_cache_aligned_allocate_handler() 205 static void* std_cache_aligned_allocate(std::size_t bytes, std::size_t alignment) { in std_cache_aligned_allocate() argument 207 return memalign(alignment, bytes); in std_cache_aligned_allocate() 210 int res = posix_memalign(&p, alignment, bytes); in std_cache_aligned_allocate() 215 return _aligned_malloc(bytes, alignment); in std_cache_aligned_allocate() 218 std::size_t space = alignment + bytes; in std_cache_aligned_allocate() 226 __TBB_ASSERT(space - (result - base) >= bytes, "Not enough space for the storage"); in std_cache_aligned_allocate()
|
| /oneTBB/test/tbbmalloc/ |
| H A D | test_malloc_pools.cpp | 67 static void *getMallocMem(intptr_t /*pool_id*/, size_t &bytes) in getMallocMem() argument 69 void *rawPtr = malloc(bytes+sizeof(MallocPoolHeader)+1); in getMallocMem() 77 hdr->userSize = bytes; in getMallocMem() 203 void *CrossThreadGetMem(intptr_t pool_id, size_t &bytes) in CrossThreadGetMem() argument 209 poolSpace[pool_id].pos += bytes; in CrossThreadGetMem() 315 void *useData(size_t &bytes) { in useData() argument 318 bytes = size; in useData() 332 static void *fixedBufGetMem(intptr_t pool_id, size_t &bytes) in fixedBufGetMem() argument 334 return ((FixedPoolHeadBase*)pool_id)->useData(bytes); in fixedBufGetMem() 482 return malloc(bytes); in getGranMem() [all …]
|
| H A D | test_scalable_allocator.cpp | 110 static void *fixedBufGetMem(intptr_t pool_id, size_t &bytes) in fixedBufGetMem() argument 116 bytes = ((FixedPool*)pool_id)->size; in fixedBufGetMem() 117 return bytes? ((FixedPool*)pool_id)->buf : nullptr; in fixedBufGetMem()
|
| H A D | test_malloc_whitebox.cpp | 375 void *getMem(intptr_t /*pool_id*/, size_t &bytes) in getMem() argument 381 if (pos + bytes > BUF_SIZE) in getMem() 385 pos += bytes; in getMem() 400 void *getMallocMem(intptr_t /*pool_id*/, size_t &bytes) in getMallocMem() argument 402 void *rawPtr = malloc(bytes+sizeof(MallocPoolHeader)); in getMallocMem() 407 hdr->userSize = bytes; in getMallocMem() 412 int putMallocMem(intptr_t /*pool_id*/, void *ptr, size_t bytes) in putMallocMem() argument 415 ASSERT(bytes == hdr->userSize, "Invalid size in pool callback."); in putMallocMem()
|
| /oneTBB/doc/main/reference/ |
| H A D | scalable_memory_pools.rst | 25 - Returns a pointer to ``n`` bytes allocated from the memory pool. 29 - Reallocates the memory object pointed by ``ptr`` to ``n`` bytes.
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | Allocator_Configuration.rst | 35 the size (bytes), that is interpreted as huge and not released during
|
| /oneTBB/test/tbb/ |
| H A D | test_limiter_node.cpp | 607 char bytes[512]{ 0 }; member
|