/external/libmicrohttpd/src/microhttpd/ |
D | memorypool.c | 89 struct MemoryPool *pool; in MHD_pool_create() local 91 pool = malloc (sizeof (struct MemoryPool)); in MHD_pool_create() 92 if (NULL == pool) in MHD_pool_create() 96 pool->memory = MAP_FAILED; in MHD_pool_create() 99 pool->memory = mmap (NULL, max, PROT_READ | PROT_WRITE, in MHD_pool_create() 102 pool->memory = VirtualAlloc(NULL, max, MEM_COMMIT | MEM_RESERVE, in MHD_pool_create() 106 pool->memory = MAP_FAILED; in MHD_pool_create() 108 if ((pool->memory == MAP_FAILED) || (pool->memory == NULL)) in MHD_pool_create() 110 pool->memory = malloc (max); in MHD_pool_create() 111 if (pool->memory == NULL) in MHD_pool_create() [all …]
|
/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/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 mtx_lock(&pool->parent->mutex); in slab_destroy_child() 145 while (pool->pages) { in slab_destroy_child() 146 struct slab_page_header *page = pool->pages; in slab_destroy_child() 147 pool->pages = page->u.next; in slab_destroy_child() [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/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 pipe_mutex_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 pipe_mutex_unlock(pool->mutex); in pool_buffer_destroy() 124 struct pool_pb_manager *pool = pool_buf->mgr; in pool_buffer_map() local 129 pipe_mutex_lock(pool->mutex); in pool_buffer_map() 130 map = (unsigned char *) pool->map + pool_buf->start; in pool_buffer_map() 131 pipe_mutex_unlock(pool->mutex); in pool_buffer_map() 149 struct pool_pb_manager *pool = pool_buf->mgr; in pool_buffer_validate() local [all …]
|
/external/fio/ |
D | smalloc.c | 42 struct pool { struct 59 static struct pool mp[MAX_POOLS]; argument 63 static inline int ptr_valid(struct pool *pool, void *ptr) in ptr_valid() argument 65 unsigned int pool_size = pool->nr_blocks * SMALLOC_BPL; in ptr_valid() 67 return (ptr >= pool->map) && (ptr < pool->map + pool_size); in ptr_valid() 75 static int blocks_iter(struct pool *pool, unsigned int pool_idx, in blocks_iter() argument 84 if (pool_idx >= pool->nr_blocks) in blocks_iter() 87 map = &pool->bitmap[pool_idx]; in blocks_iter() 130 static int blocks_free(struct pool *pool, unsigned int pool_idx, in blocks_free() argument 133 return blocks_iter(pool, pool_idx, idx, nr_blocks, mask_cmp); in blocks_free() [all …]
|
/external/mesa3d/src/intel/vulkan/ |
D | anv_allocator.c | 247 anv_block_pool_grow(struct anv_block_pool *pool, struct anv_block_state *state); 250 anv_block_pool_init(struct anv_block_pool *pool, in anv_block_pool_init() argument 257 pool->device = device; in anv_block_pool_init() 258 anv_bo_init(&pool->bo, 0, 0); in anv_block_pool_init() 259 pool->block_size = block_size; in anv_block_pool_init() 260 pool->free_list = ANV_FREE_LIST_EMPTY; in anv_block_pool_init() 261 pool->back_free_list = ANV_FREE_LIST_EMPTY; in anv_block_pool_init() 263 pool->fd = memfd_create("block pool", MFD_CLOEXEC); in anv_block_pool_init() 264 if (pool->fd == -1) in anv_block_pool_init() 271 if (ftruncate(pool->fd, BLOCK_POOL_MEMFD_SIZE) == -1) { in anv_block_pool_init() [all …]
|
D | anv_query.c | 39 struct anv_query_pool *pool; in anv_CreateQueryPool() local 57 pool = vk_alloc2(&device->alloc, pAllocator, sizeof(*pool), 8, in anv_CreateQueryPool() 59 if (pool == NULL) in anv_CreateQueryPool() 62 pool->type = pCreateInfo->queryType; in anv_CreateQueryPool() 63 pool->slots = pCreateInfo->queryCount; in anv_CreateQueryPool() 66 result = anv_bo_init_new(&pool->bo, device, size); in anv_CreateQueryPool() 70 pool->bo.map = anv_gem_mmap(device, pool->bo.gem_handle, 0, size, 0); in anv_CreateQueryPool() 72 *pQueryPool = anv_query_pool_to_handle(pool); in anv_CreateQueryPool() 77 vk_free2(&device->alloc, pAllocator, pool); in anv_CreateQueryPool() 88 ANV_FROM_HANDLE(anv_query_pool, pool, _pool); in anv_DestroyQueryPool() [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/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 | 41 CRYPTO_BUFFER_POOL *pool = OPENSSL_malloc(sizeof(CRYPTO_BUFFER_POOL)); in CRYPTO_BUFFER_POOL_new() local 42 if (pool == NULL) { in CRYPTO_BUFFER_POOL_new() 46 OPENSSL_memset(pool, 0, sizeof(CRYPTO_BUFFER_POOL)); in CRYPTO_BUFFER_POOL_new() 47 pool->bufs = lh_CRYPTO_BUFFER_new(CRYPTO_BUFFER_hash, CRYPTO_BUFFER_cmp); in CRYPTO_BUFFER_POOL_new() 48 if (pool->bufs == NULL) { in CRYPTO_BUFFER_POOL_new() 49 OPENSSL_free(pool); in CRYPTO_BUFFER_POOL_new() 53 CRYPTO_MUTEX_init(&pool->lock); in CRYPTO_BUFFER_POOL_new() 55 return pool; in CRYPTO_BUFFER_POOL_new() 58 void CRYPTO_BUFFER_POOL_free(CRYPTO_BUFFER_POOL *pool) { in CRYPTO_BUFFER_POOL_free() argument 59 if (pool == NULL) { in CRYPTO_BUFFER_POOL_free() [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/skia/tests/ |
D | GrMemoryPoolTest.cpp | 50 GrMemoryPool* pool = new GrMemoryPool(preallocSize, minAllocSize); in SetAllocator() local 51 gPool.reset(pool); in SetAllocator() 235 AutoPoolReleaser(GrMemoryPool& pool): fPool(pool) { in AutoPoolReleaser() argument 254 auto allocateMemory = [](GrMemoryPool& pool, AutoPoolReleaser& r) { in DEF_TEST() argument 255 size_t origPoolSize = pool.size(); in DEF_TEST() 256 while (pool.size() == origPoolSize) { in DEF_TEST() 257 r.add(pool.allocate(31)); in DEF_TEST() 263 GrMemoryPool pool(0, 0); in DEF_TEST() local 264 REPORTER_ASSERT(reporter, pool.preallocSize() == kSmallestMinAllocSize); in DEF_TEST() 270 GrMemoryPool pool(kSmallestMinAllocSize, kMinAllocSize); in DEF_TEST() local [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() 44 ByteArrayPool pool = new ByteArrayPool(32); in obeysSizeLimit() local 46 byte[] buf1 = pool.getBuf(16); in obeysSizeLimit() 47 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() 35 ByteArrayPool pool = new ByteArrayPool(32768); in pooledIndividualWrites() local 36 writeBytesIndividually(pool); in pooledIndividualWrites() 37 writeBytesIndividually(pool); in pooledIndividualWrites() 38 writeBytesIndividually(pool); in pooledIndividualWrites() 42 ByteArrayPool pool = new ByteArrayPool(0); in unpooled() local 43 writeOneBuffer(pool); in unpooled() [all …]
|
/external/mesa3d/src/amd/vulkan/ |
D | radv_query.c | 60 struct radv_query_pool *pool = vk_alloc2(&device->alloc, pAllocator, in radv_CreateQueryPool() local 61 sizeof(*pool), 8, in radv_CreateQueryPool() 64 if (!pool) in radv_CreateQueryPool() 72 pool->stride = 16 * get_max_db(device) + 16; in radv_CreateQueryPool() 75 pool->stride = 16 * 11; in radv_CreateQueryPool() 78 pool->stride = 8; in radv_CreateQueryPool() 84 pool->type = pCreateInfo->queryType; in radv_CreateQueryPool() 85 pool->availability_offset = pool->stride * pCreateInfo->queryCount; in radv_CreateQueryPool() 86 size = pool->availability_offset + 4 * pCreateInfo->queryCount; in radv_CreateQueryPool() 88 pool->bo = device->ws->buffer_create(device->ws, size, in radv_CreateQueryPool() [all …]
|
D | radv_descriptor_set.c | 245 struct radv_descriptor_pool *pool, in radv_descriptor_set_create() argument 278 if (pool->current_offset + layout_size <= pool->size && in radv_descriptor_set_create() 279 pool->allocated_sets < pool->max_sets) { in radv_descriptor_set_create() 280 set->bo = pool->bo; in radv_descriptor_set_create() 281 set->mapped_ptr = (uint32_t*)(pool->mapped_ptr + pool->current_offset); in radv_descriptor_set_create() 282 set->va = device->ws->buffer_get_va(set->bo) + pool->current_offset; in radv_descriptor_set_create() 283 pool->current_offset += layout_size; in radv_descriptor_set_create() 284 ++pool->allocated_sets; in radv_descriptor_set_create() 286 int entry = pool->free_list, prev_entry = -1; in radv_descriptor_set_create() 289 if (pool->free_nodes[entry].size >= layout_size) { in radv_descriptor_set_create() [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/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/javassist/src/main/javassist/bytecode/ |
D | InstructionPrinter.java | 41 ConstPool pool = info.getConstPool(); in print() local 55 stream.println(pos + ": " + instructionString(iterator, pos, pool)); in print() 59 public static String instructionString(CodeIterator iter, int pos, ConstPool pool) { in instructionString() argument 72 return opstring + " " + ldc(pool, iter.byteAt(pos + 1)); in instructionString() 75 return opstring + " " + ldc(pool, iter.u16bitAt(pos + 1)); in instructionString() 119 return opstring + " " + fieldInfo(pool, iter.u16bitAt(pos + 1)); in instructionString() 123 return opstring + " " + methodInfo(pool, iter.u16bitAt(pos + 1)); in instructionString() 125 return opstring + " " + interfaceMethodInfo(pool, iter.u16bitAt(pos + 1)); in instructionString() 129 return opstring + " " + classInfo(pool, iter.u16bitAt(pos + 1)); in instructionString() 134 return opstring + " " + classInfo(pool, iter.u16bitAt(pos + 1)); in instructionString() [all …]
|
/external/protobuf/python/google/protobuf/internal/ |
D | descriptor_pool_test.py | 65 self.pool = descriptor_pool.DescriptorPool() 70 self.pool.Add(self.factory_test1_fd) 71 self.pool.Add(self.factory_test2_fd) 75 file_desc1 = self.pool.FindFileByName(name1) 82 file_desc2 = self.pool.FindFileByName(name2) 90 self.pool.FindFileByName('Does not exist') 93 file_desc1 = self.pool.FindFileContainingSymbol( 101 file_desc2 = self.pool.FindFileContainingSymbol( 111 self.pool.FindFileContainingSymbol('Does not exist') 114 msg1 = self.pool.FindMessageTypeByName( [all …]
|
/external/pdfium/core/fxcrt/ |
D | cfx_string_pool_template_unittest.cpp | 11 CFX_ByteStringPool pool; in TEST() local 23 CFX_ByteString interned_null1 = pool.Intern(null1); in TEST() 24 CFX_ByteString interned_null2 = pool.Intern(null2); in TEST() 25 CFX_ByteString interned_goats1 = pool.Intern(goats1); in TEST() 26 CFX_ByteString interned_goats2 = pool.Intern(goats2); in TEST() 40 pool.Clear(); in TEST() 41 CFX_ByteString reinterned_null2 = pool.Intern(null2); in TEST() 42 CFX_ByteString reinterned_null1 = pool.Intern(null2); in TEST() 43 CFX_ByteString reinterned_goats2 = pool.Intern(goats2); in TEST() 44 CFX_ByteString reinterned_goats1 = pool.Intern(goats2); in TEST() [all …]
|
/external/autotest/site_utils/ |
D | balance_pools.py | 173 def __init__(self, afe, board, pool, start_time, end_time): argument 175 self.pool = pool 180 self._labels = [_POOL_PREFIX + self.pool] 187 board=self.board, pool=self.pool)) 242 self.board, self.pool, 298 len(hosts), spare_pool.pool, target_pool.pool) 313 def _balance_board(arguments, afe, board, pool, start_time, end_time): argument 330 main_pool = _DUTPool(afe, board, pool, 355 _log_info(dry_run, 'Balancing %s %s pool:', board, main_pool.pool) 372 board, main_pool.pool, len(spare_pool.working_hosts)) [all …]
|