/external/mesa3d/src/gallium/state_trackers/nine/ |
D | threadpool.c | 43 struct threadpool *pool = data; in threadpool_worker() local 45 pthread_mutex_lock(&pool->m); in threadpool_worker() 47 while (!pool->shutdown) { in threadpool_worker() 51 while (!pool->workqueue && !pool->shutdown) in threadpool_worker() 52 pthread_cond_wait(&pool->new_work, &pool->m); in threadpool_worker() 54 if (pool->shutdown) { in threadpool_worker() 55 pthread_mutex_unlock(&pool->m); in threadpool_worker() 63 task = pool->workqueue; in threadpool_worker() 64 pool->workqueue = task->next; in threadpool_worker() 67 pthread_mutex_unlock(&pool->m); in threadpool_worker() [all …]
|
D | nine_helpers.c | 26 nine_range_pool_more(struct nine_range_pool *pool) in nine_range_pool_more() argument 30 assert(!pool->free); in nine_range_pool_more() 32 if (pool->num_slabs == pool->num_slabs_max) { in nine_range_pool_more() 33 unsigned p = pool->num_slabs_max; in nine_range_pool_more() 34 unsigned n = pool->num_slabs_max * 2; in nine_range_pool_more() 37 pool->slabs = REALLOC(pool->slabs, in nine_range_pool_more() 40 pool->num_slabs_max = n; in nine_range_pool_more() 42 pool->free = pool->slabs[pool->num_slabs++] = r; in nine_range_pool_more() 49 return pool->free; in nine_range_pool_more() 53 nine_range_pool_get(struct nine_range_pool *pool, int16_t bgn, int16_t end) in nine_range_pool_get() argument [all …]
|
/external/mesa3d/src/gallium/drivers/r600/ |
D | compute_memory_pool.c | 52 struct compute_memory_pool* pool = (struct compute_memory_pool*) in compute_memory_pool_new() local 54 if (!pool) in compute_memory_pool_new() 59 pool->screen = rscreen; in compute_memory_pool_new() 60 pool->item_list = (struct list_head *) in compute_memory_pool_new() 62 pool->unallocated_list = (struct list_head *) in compute_memory_pool_new() 64 list_inithead(pool->item_list); in compute_memory_pool_new() 65 list_inithead(pool->unallocated_list); in compute_memory_pool_new() 66 return pool; in compute_memory_pool_new() 75 static void compute_memory_pool_init(struct compute_memory_pool * pool, in compute_memory_pool_init() argument 79 COMPUTE_DBG(pool->screen, "* compute_memory_pool_init() initial_size_in_dw = %u\n", in compute_memory_pool_init() [all …]
|
/external/deqp/framework/delibs/depool/ |
D | deMemPool.c | 171 deMemPool* pool; in createPoolInternal() local 189 pool = (deMemPool*)(initialPage + 1); in createPoolInternal() 192 memset(pool, 0, sizeof(deMemPool)); in createPoolInternal() 193 pool->currentPage = initialPage; in createPoolInternal() 196 pool->parent = parent; in createPoolInternal() 200 if (parent->firstChild) parent->firstChild->prevPool = pool; in createPoolInternal() 201 pool->nextPool = parent->firstChild; in createPoolInternal() 202 parent->firstChild = pool; in createPoolInternal() 206 pool->util = parent ? parent->util : DE_NULL; in createPoolInternal() 209 pool->allowFailing = parent ? parent->allowFailing : DE_FALSE; in createPoolInternal() [all …]
|
/external/tensorflow/tensorflow/core/common_runtime/gpu/ |
D | pool_allocator_test.cc | 30 PoolAllocator pool( in TEST() local 38 EXPECT_EQ(nullptr, pool.AllocateRaw(4 /*alignment*/, 0 /*num_bytes*/)); in TEST() 39 pool.DeallocateRaw(nullptr); // Should not crash. in TEST() 40 EXPECT_EQ(0, pool.get_from_pool_count()); in TEST() 41 EXPECT_EQ(0, pool.put_count()); in TEST() 42 EXPECT_EQ(0, pool.allocated_count()); in TEST() 43 EXPECT_EQ(0, pool.evicted_count()); in TEST() 49 PoolAllocator pool( in TEST() local 57 EXPECT_EQ(0, pool.get_from_pool_count()); in TEST() 58 EXPECT_EQ(0, pool.put_count()); in TEST() [all …]
|
/external/mesa3d/src/util/ |
D | slab.c | 126 void slab_create_child(struct slab_child_pool *pool, in slab_create_child() argument 129 pool->parent = parent; in slab_create_child() 130 pool->pages = NULL; in slab_create_child() 131 pool->free = NULL; in slab_create_child() 132 pool->migrated = NULL; in slab_create_child() 141 void slab_destroy_child(struct slab_child_pool *pool) in slab_destroy_child() argument 143 if (!pool->parent) in slab_destroy_child() 146 mtx_lock(&pool->parent->mutex); in slab_destroy_child() 148 while (pool->pages) { in slab_destroy_child() 149 struct slab_page_header *page = pool->pages; in slab_destroy_child() [all …]
|
/external/mesa3d/src/gallium/auxiliary/pipebuffer/ |
D | pb_bufmgr_pool.c | 109 struct pool_pb_manager *pool = pool_buf->mgr; in pool_buffer_destroy() local 113 mtx_lock(&pool->mutex); in pool_buffer_destroy() 114 LIST_ADD(&pool_buf->head, &pool->free); in pool_buffer_destroy() 115 pool->numFree++; in pool_buffer_destroy() 116 mtx_unlock(&pool->mutex); in pool_buffer_destroy() 124 struct pool_pb_manager *pool = pool_buf->mgr; in pool_buffer_map() local 129 mtx_lock(&pool->mutex); in pool_buffer_map() 130 map = (unsigned char *) pool->map + pool_buf->start; in pool_buffer_map() 131 mtx_unlock(&pool->mutex); in pool_buffer_map() 149 struct pool_pb_manager *pool = pool_buf->mgr; in pool_buffer_validate() local [all …]
|
/external/wayland/src/ |
D | wayland-shm.c | 70 struct wl_shm_pool *pool; member 80 shm_pool_finish_resize(struct wl_shm_pool *pool) in shm_pool_finish_resize() argument 84 if (pool->size == pool->new_size) in shm_pool_finish_resize() 87 data = mremap(pool->data, pool->size, pool->new_size, MREMAP_MAYMOVE); in shm_pool_finish_resize() 89 wl_resource_post_error(pool->resource, in shm_pool_finish_resize() 95 pool->data = data; in shm_pool_finish_resize() 96 pool->size = pool->new_size; in shm_pool_finish_resize() 100 shm_pool_unref(struct wl_shm_pool *pool, bool external) in shm_pool_unref() argument 103 pool->external_refcount--; in shm_pool_unref() 104 if (pool->external_refcount == 0) in shm_pool_unref() [all …]
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
D | ConnectionPoolTest.java | 48 ConnectionPool pool = new ConnectionPool(Integer.MAX_VALUE, 100L, TimeUnit.NANOSECONDS); in connectionsEvictedWhenIdleLongEnough() local 49 pool.setCleanupRunnableForTest(emptyRunnable); in connectionsEvictedWhenIdleLongEnough() 51 RealConnection c1 = newConnection(pool, routeA1, 50L); in connectionsEvictedWhenIdleLongEnough() 54 assertEquals(100L, pool.cleanup(50L)); in connectionsEvictedWhenIdleLongEnough() 55 assertEquals(1, pool.getConnectionCount()); in connectionsEvictedWhenIdleLongEnough() 59 assertEquals(90L, pool.cleanup(60L)); in connectionsEvictedWhenIdleLongEnough() 60 assertEquals(1, pool.getConnectionCount()); in connectionsEvictedWhenIdleLongEnough() 64 assertEquals(1L, pool.cleanup(149L)); in connectionsEvictedWhenIdleLongEnough() 65 assertEquals(1, pool.getConnectionCount()); in connectionsEvictedWhenIdleLongEnough() 69 assertEquals(0, pool.cleanup(150L)); in connectionsEvictedWhenIdleLongEnough() [all …]
|
/external/skqp/src/compute/skc/platforms/cl_12/ |
D | cq_pool_cl.c | 48 struct skc_cq_pool * const pool) in skc_runtime_cl_12_create_cq() argument 61 pool->cq_props, in skc_runtime_cl_12_create_cq() 102 struct skc_cq_pool * const pool, in skc_cq_pool_create() argument 106 pool->size = size + 1; // an empty spot in skc_cq_pool_create() 107 pool->reads = 0; in skc_cq_pool_create() 108 pool->writes = size; in skc_cq_pool_create() 110 pool->cq_props = cq_props; in skc_cq_pool_create() 111 pool->cq = skc_runtime_host_perm_alloc(runtime,SKC_MEM_FLAGS_READ_WRITE, in skc_cq_pool_create() 112 pool->size * sizeof(*pool->cq)); in skc_cq_pool_create() 114 pool->cq[ii] = skc_runtime_cl_12_create_cq(runtime,pool); in skc_cq_pool_create() [all …]
|
/external/skia/src/compute/skc/platforms/cl_12/ |
D | cq_pool_cl.c | 48 struct skc_cq_pool * const pool) in skc_runtime_cl_12_create_cq() argument 61 pool->cq_props, in skc_runtime_cl_12_create_cq() 102 struct skc_cq_pool * const pool, in skc_cq_pool_create() argument 106 pool->size = size + 1; // an empty spot in skc_cq_pool_create() 107 pool->reads = 0; in skc_cq_pool_create() 108 pool->writes = size; in skc_cq_pool_create() 110 pool->cq_props = cq_props; in skc_cq_pool_create() 111 pool->cq = skc_runtime_host_perm_alloc(runtime,SKC_MEM_FLAGS_READ_WRITE, in skc_cq_pool_create() 112 pool->size * sizeof(*pool->cq)); in skc_cq_pool_create() 114 pool->cq[ii] = skc_runtime_cl_12_create_cq(runtime,pool); in skc_cq_pool_create() [all …]
|
/external/mesa3d/src/intel/vulkan/ |
D | anv_allocator.c | 240 anv_block_pool_expand_range(struct anv_block_pool *pool, 244 anv_block_pool_init(struct anv_block_pool *pool, in anv_block_pool_init() argument 251 pool->device = device; in anv_block_pool_init() 252 pool->bo_flags = bo_flags; in anv_block_pool_init() 253 anv_bo_init(&pool->bo, 0, 0); in anv_block_pool_init() 255 pool->fd = memfd_create("block pool", MFD_CLOEXEC); in anv_block_pool_init() 256 if (pool->fd == -1) in anv_block_pool_init() 263 if (ftruncate(pool->fd, BLOCK_POOL_MEMFD_SIZE) == -1) { in anv_block_pool_init() 268 if (!u_vector_init(&pool->mmap_cleanups, in anv_block_pool_init() 275 pool->state.next = 0; in anv_block_pool_init() [all …]
|
D | genX_query.c | 43 struct anv_query_pool *pool; in genX() local 79 pool = vk_alloc2(&device->alloc, pAllocator, sizeof(*pool), 8, in genX() 81 if (pool == NULL) in genX() 84 pool->type = pCreateInfo->queryType; in genX() 85 pool->pipeline_statistics = pipeline_statistics; in genX() 86 pool->stride = uint64s_per_slot * sizeof(uint64_t); in genX() 87 pool->slots = pCreateInfo->queryCount; in genX() 89 uint64_t size = pool->slots * pool->stride; in genX() 90 result = anv_bo_init_new(&pool->bo, device, size); in genX() 95 pool->bo.flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS; in genX() [all …]
|
/external/libunwind/src/mi/ |
D | mempool.c | 86 free_object (struct mempool *pool, void *object) in free_object() argument 90 obj->next = pool->free_list; in free_object() 91 pool->free_list = obj; in free_object() 92 ++pool->num_free; in free_object() 96 add_memory (struct mempool *pool, char *mem, size_t size, size_t obj_size) in add_memory() argument 101 free_object (pool, obj); in add_memory() 105 expand (struct mempool *pool) in expand() argument 110 size = pool->chunk_size; in expand() 114 size = UNW_ALIGN(pool->obj_size, pg_size); in expand() 119 size = pool->obj_size; in expand() [all …]
|
/external/mesa3d/src/gallium/drivers/r300/compiler/ |
D | memory_pool.c | 38 void memory_pool_init(struct memory_pool * pool) in memory_pool_init() argument 40 memset(pool, 0, sizeof(struct memory_pool)); in memory_pool_init() 44 void memory_pool_destroy(struct memory_pool * pool) in memory_pool_destroy() argument 46 while(pool->blocks) { in memory_pool_destroy() 47 struct memory_block * block = pool->blocks; in memory_pool_destroy() 48 pool->blocks = block->next; in memory_pool_destroy() 53 static void refill_pool(struct memory_pool * pool) in refill_pool() argument 55 unsigned int blocksize = pool->total_allocated; in refill_pool() 62 newblock->next = pool->blocks; in refill_pool() 63 pool->blocks = newblock; in refill_pool() [all …]
|
/external/boringssl/src/crypto/pool/ |
D | pool.c | 43 CRYPTO_BUFFER_POOL *pool = OPENSSL_malloc(sizeof(CRYPTO_BUFFER_POOL)); in CRYPTO_BUFFER_POOL_new() local 44 if (pool == NULL) { in CRYPTO_BUFFER_POOL_new() 48 OPENSSL_memset(pool, 0, sizeof(CRYPTO_BUFFER_POOL)); in CRYPTO_BUFFER_POOL_new() 49 pool->bufs = lh_CRYPTO_BUFFER_new(CRYPTO_BUFFER_hash, CRYPTO_BUFFER_cmp); in CRYPTO_BUFFER_POOL_new() 50 if (pool->bufs == NULL) { in CRYPTO_BUFFER_POOL_new() 51 OPENSSL_free(pool); in CRYPTO_BUFFER_POOL_new() 55 CRYPTO_MUTEX_init(&pool->lock); in CRYPTO_BUFFER_POOL_new() 57 return pool; in CRYPTO_BUFFER_POOL_new() 60 void CRYPTO_BUFFER_POOL_free(CRYPTO_BUFFER_POOL *pool) { in CRYPTO_BUFFER_POOL_free() argument 61 if (pool == NULL) { in CRYPTO_BUFFER_POOL_free() [all …]
|
/external/libxcam/wrapper/gstreamer/ |
D | gstxcambufferpool.cpp | 57 gst_xcam_buffer_pool_start (GstBufferPool *pool); 60 gst_xcam_buffer_pool_stop (GstBufferPool *pool); 63 gst_xcam_buffer_pool_set_config (GstBufferPool *pool, GstStructure *config); 97 gst_xcam_buffer_pool_init (GstXCamBufferPool *pool) in gst_xcam_buffer_pool_init() argument 99 pool->need_video_meta = FALSE; in gst_xcam_buffer_pool_init() 100 XCAM_CONSTRUCTOR (pool->device_manager, SmartPtr<MainDeviceManager>); in gst_xcam_buffer_pool_init() 106 GstXCamBufferPool *pool = GST_XCAM_BUFFER_POOL (object); in gst_xcam_buffer_pool_finalize() local 107 XCAM_ASSERT (pool); in gst_xcam_buffer_pool_finalize() 109 if (pool->src) in gst_xcam_buffer_pool_finalize() 110 gst_object_unref (pool->src); in gst_xcam_buffer_pool_finalize() [all …]
|
/external/python/cpython2/Doc/includes/ |
D | mp_pool.py | 57 pool = multiprocessing.Pool(PROCESSES) 58 print 'pool = %s' % pool 68 results = [pool.apply_async(calculate, t) for t in TASKS] 69 imap_it = pool.imap(calculatestar, TASKS) 70 imap_unordered_it = pool.imap_unordered(calculatestar, TASKS) 88 for x in pool.map(calculatestar, TASKS): 105 B = pool.map(pow3, xrange(N)) 110 C = list(pool.imap(pow3, xrange(N), chunksize=N//8)) 127 B = pool.map(noop, L) 132 C = list(pool.imap(noop, L, chunksize=len(L)//8)) [all …]
|
/external/volley/src/test/java/com/android/volley/toolbox/ |
D | ByteArrayPoolTest.java | 28 ByteArrayPool pool = new ByteArrayPool(32); in reusesBuffer() local 30 byte[] buf1 = pool.getBuf(16); in reusesBuffer() 31 byte[] buf2 = pool.getBuf(16); in reusesBuffer() 33 pool.returnBuf(buf1); in reusesBuffer() 34 pool.returnBuf(buf2); in reusesBuffer() 36 byte[] buf3 = pool.getBuf(16); in reusesBuffer() 37 byte[] buf4 = pool.getBuf(16); in reusesBuffer() 45 ByteArrayPool pool = new ByteArrayPool(32); in obeysSizeLimit() local 47 byte[] buf1 = pool.getBuf(16); in obeysSizeLimit() 48 byte[] buf2 = pool.getBuf(16); in obeysSizeLimit() [all …]
|
D | PoolingByteArrayOutputStreamTest.java | 28 ByteArrayPool pool = new ByteArrayPool(32768); in pooledOneBuffer() local 29 writeOneBuffer(pool); in pooledOneBuffer() 30 writeOneBuffer(pool); in pooledOneBuffer() 31 writeOneBuffer(pool); in pooledOneBuffer() 36 ByteArrayPool pool = new ByteArrayPool(32768); in pooledIndividualWrites() local 37 writeBytesIndividually(pool); in pooledIndividualWrites() 38 writeBytesIndividually(pool); in pooledIndividualWrites() 39 writeBytesIndividually(pool); in pooledIndividualWrites() 44 ByteArrayPool pool = new ByteArrayPool(0); in unpooled() local 45 writeOneBuffer(pool); in unpooled() [all …]
|
/external/wayland/cursor/ |
D | wayland-cursor.c | 44 struct wl_shm_pool *pool; member 54 struct shm_pool *pool; in shm_pool_create() local 56 pool = malloc(sizeof *pool); in shm_pool_create() 57 if (!pool) in shm_pool_create() 60 pool->fd = os_create_anonymous_file(size); in shm_pool_create() 61 if (pool->fd < 0) in shm_pool_create() 64 pool->data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, in shm_pool_create() 65 pool->fd, 0); in shm_pool_create() 67 if (pool->data == MAP_FAILED) in shm_pool_create() 70 pool->pool = wl_shm_create_pool(shm, pool->fd, size); in shm_pool_create() [all …]
|
/external/zopfli/src/zopfli/ |
D | katajainen.c | 67 static Node* GetFreeNode(Node* (*lists)[2], int maxbits, NodePool* pool) { in GetFreeNode() argument 69 if (pool->next >= &pool->nodes[pool->size]) { in GetFreeNode() 72 for (i = 0; i < pool->size; i++) { in GetFreeNode() 73 pool->nodes[i].inuse = 0; in GetFreeNode() 83 pool->next = &pool->nodes[0]; in GetFreeNode() 85 if (!pool->next->inuse) break; /* Found one. */ in GetFreeNode() 86 pool->next++; in GetFreeNode() 88 return pool->next++; in GetFreeNode() 106 Node* leaves, int numsymbols, NodePool* pool, int index, char final) { in BoundaryPM() argument 113 newchain = GetFreeNode(lists, maxbits, pool); in BoundaryPM() [all …]
|
/external/jemalloc_new/include/jemalloc/internal/ |
D | mutex_pool.h | 16 bool mutex_pool_init(mutex_pool_t *pool, const char *name, witness_rank_t rank); 20 mutex_pool_mutex(mutex_pool_t *pool, uintptr_t key) { in mutex_pool_mutex() argument 23 return &pool->mutexes[hash_result[0] % MUTEX_POOL_SIZE]; in mutex_pool_mutex() 27 mutex_pool_assert_not_held(tsdn_t *tsdn, mutex_pool_t *pool) { in mutex_pool_assert_not_held() argument 29 malloc_mutex_assert_not_owner(tsdn, &pool->mutexes[i]); in mutex_pool_assert_not_held() 41 mutex_pool_lock(tsdn_t *tsdn, mutex_pool_t *pool, uintptr_t key) { in mutex_pool_lock() argument 42 mutex_pool_assert_not_held(tsdn, pool); in mutex_pool_lock() 44 malloc_mutex_t *mutex = mutex_pool_mutex(pool, key); in mutex_pool_lock() 49 mutex_pool_unlock(tsdn_t *tsdn, mutex_pool_t *pool, uintptr_t key) { in mutex_pool_unlock() argument 50 malloc_mutex_t *mutex = mutex_pool_mutex(pool, key); in mutex_pool_unlock() [all …]
|
/external/perfetto/src/trace_processor/ |
D | string_pool_unittest.cc | 28 StringPool pool; in TEST() local 30 ASSERT_EQ(pool.Get(0).c_str(), nullptr); in TEST() 32 auto it = pool.CreateIterator(); in TEST() 39 StringPool pool; in TEST() local 42 auto id = pool.InternString(kString); in TEST() 43 ASSERT_STREQ(pool.Get(id).c_str(), kString); in TEST() 44 ASSERT_EQ(pool.Get(id), kString); in TEST() 45 ASSERT_EQ(id, pool.InternString(kString)); in TEST() 49 StringPool pool; in TEST() local 51 auto id = pool.InternString(NullTermStringView()); in TEST() [all …]
|
/external/grpc-grpc/src/csharp/Grpc.Core.Tests/Internal/ |
D | DefaultObjectPoolTest.cs | 36 …var pool = new DefaultObjectPool<TestPooledObject>(() => new TestPooledObject(), sharedCapacity, t… in ObjectIsReused() 37 var origLeased = pool.Lease(); in ObjectIsReused() 38 pool.Return(origLeased); in ObjectIsReused() 39 Assert.AreSame(origLeased, pool.Lease()); in ObjectIsReused() 40 Assert.AreNotSame(origLeased, pool.Lease()); in ObjectIsReused() 46 var pool = new DefaultObjectPool<TestPooledObject>(() => new TestPooledObject(), 0, 0); in ZeroCapacities() 47 var origLeased = pool.Lease(); in ZeroCapacities() 48 pool.Return(origLeased); in ZeroCapacities() 49 Assert.AreNotSame(origLeased, pool.Lease()); in ZeroCapacities() 55 var pool = new DefaultObjectPool<TestPooledObject>(() => new TestPooledObject(), 10, 0); in DisposeCleansSharedPool() [all …]
|