Lines Matching refs:p
182 for (int p=utils::MinThread; p<=utils::MaxThread; p++) { in TestSharedPool() local
183 SharedPoolRun::init(p, pool, crossThread, afterTerm); in TestSharedPool()
189 utils::NativeParallelFor( p, thr ); in TestSharedPool()
192 for (int i=0; i<p*SharedPoolRun::OBJ_CNT; i++) in TestSharedPool()
282 for (int p=utils::MinThread; p<=utils::MaxThread; p++) { in TestCrossThreadPools() local
283 CrossThreadRun::initBarrier(p); in TestCrossThreadPools()
284 CrossThreadRun::init(p); in TestCrossThreadPools()
285 utils::NativeParallelFor( p, CrossThreadRun() ); in TestCrossThreadPools()
286 for (int i=0; i<p; i++) in TestCrossThreadPools()
343 FixedPoolUse(unsigned threads, rml::MemoryPool *p, size_t sz, int it) : in FixedPoolUse() argument
344 pool(p), reqSize(sz), iters(it) { in FixedPoolUse()
363 FixedPoolNomem(utils::SpinBarrier *b, rml::MemoryPool *p) : in FixedPoolNomem() argument
364 startB(b), pool(p) {} in FixedPoolNomem()
376 FixedPoolSomeMem(utils::SpinBarrier *b, rml::MemoryPool *p) : in FixedPoolSomeMem() argument
377 barrier(b), pool(p) {} in FixedPoolSomeMem()
389 if (void *p = pool_malloc(pool, sz)) { in haveEnoughSpace() local
390 pool_free(pool, p); in haveEnoughSpace()
422 for (int p=utils::MinThread; p<=utils::MaxThread; p++) { in TestFixedBufferPool() local
423 utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 10000) ); in TestFixedBufferPool()
426 const int p = 128; in TestFixedBufferPool() local
427 utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 1) ); in TestFixedBufferPool()
431 const int p = 256; in TestFixedBufferPool() local
432 utils::SpinBarrier barrier(p); in TestFixedBufferPool()
455 utils::NativeParallelFor( p, FixedPoolNomem(&barrier, pool) ); in TestFixedBufferPool()
460 utils::NativeParallelFor( p, FixedPoolSomeMem(&barrier, pool) ); in TestFixedBufferPool()
470 int p=128; in TestFixedBufferPool() local
471 utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 1) ); in TestFixedBufferPool()
503 void *p = pool_malloc(pool, sz); in TestPoolGranularity() local
504 REQUIRE_MESSAGE(p, "Can't allocate memory in pool."); in TestPoolGranularity()
505 pool_free(pool, p); in TestPoolGranularity()
517 void *p = malloc(bytes); in getMemMalloc() local
518 if (p) in getMemMalloc()
520 return p; in getMemMalloc()
561 void *p = pool_malloc(pool, 8*1024*1024); in TestPoolKeepTillDestroy() local
562 REQUIRE(p); in TestPoolKeepTillDestroy()
601 char *p = (char*)pool_aligned_malloc(pool, size[i], algn[j]); in TestEntries() local
602 REQUIRE((p && 0==((uintptr_t)p & (algn[j]-1)))); in TestEntries()
603 memset(p, j, size[i]); in TestEntries()
607 char *p1 = (char*)pool_aligned_realloc(pool, p, curr_sz, curr_algn); in TestEntries()
667 rml::MemoryPool *p = CreateUsablePool(1024); in CheckPoolLeaks() local
668 if (!p) in CheckPoolLeaks()
670 pools[created] = p; in CheckPoolLeaks()
725 PoolIdentityCheck(rml::MemoryPool** p, AllocatedObject** o) : pools(p), objs(o) {} in PoolIdentityCheck() argument
769 rml::MemoryPool *p = rml::pool_identify(objs[i]); in TestPoolDetection() local
770 REQUIRE(p == objs[i]->pool); in TestPoolDetection()
771 pool_free(p, objs[i]); in TestPoolDetection()
797 NoLeakOnDestroyRun(rml::MemoryPool *p, utils::SpinBarrier *b) : pool(p), barrier(b) {} in NoLeakOnDestroyRun() argument
799 void *p = pool_malloc(pool, id%2? 8 : 9000); in operator ()() local
800 REQUIRE((p && liveRegions.load(std::memory_order_relaxed))); in operator ()()
816 for (int p=utils::MinThread; p<=utils::MaxThread; p++) { in TestNoLeakOnDestroy() local
818 utils::SpinBarrier barrier(p); in TestNoLeakOnDestroy()
822 utils::NativeParallelFor(p, NoLeakOnDestroyRun(pool, &barrier)); in TestNoLeakOnDestroy()