/third_party/openssl/crypto/rand/ |
D | rand_pool.c | 25 RAND_POOL *pool = OPENSSL_zalloc(sizeof(*pool)); in ossl_rand_pool_new() local 28 if (pool == NULL) { in ossl_rand_pool_new() 33 pool->min_len = min_len; in ossl_rand_pool_new() 34 pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? in ossl_rand_pool_new() 36 pool->alloc_len = min_len < min_alloc_size ? min_alloc_size : min_len; in ossl_rand_pool_new() 37 if (pool->alloc_len > pool->max_len) in ossl_rand_pool_new() 38 pool->alloc_len = pool->max_len; in ossl_rand_pool_new() 41 pool->buffer = OPENSSL_secure_zalloc(pool->alloc_len); in ossl_rand_pool_new() 43 pool->buffer = OPENSSL_zalloc(pool->alloc_len); in ossl_rand_pool_new() 45 if (pool->buffer == NULL) { in ossl_rand_pool_new() [all …]
|
/third_party/node/deps/openssl/openssl/crypto/rand/ |
D | rand_pool.c | 25 RAND_POOL *pool = OPENSSL_zalloc(sizeof(*pool)); in ossl_rand_pool_new() local 28 if (pool == NULL) { in ossl_rand_pool_new() 33 pool->min_len = min_len; in ossl_rand_pool_new() 34 pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? in ossl_rand_pool_new() 36 pool->alloc_len = min_len < min_alloc_size ? min_alloc_size : min_len; in ossl_rand_pool_new() 37 if (pool->alloc_len > pool->max_len) in ossl_rand_pool_new() 38 pool->alloc_len = pool->max_len; in ossl_rand_pool_new() 41 pool->buffer = OPENSSL_secure_zalloc(pool->alloc_len); in ossl_rand_pool_new() 43 pool->buffer = OPENSSL_zalloc(pool->alloc_len); in ossl_rand_pool_new() 45 if (pool->buffer == NULL) { in ossl_rand_pool_new() [all …]
|
/third_party/skia/tests/ |
D | SkBlockAllocatorTest.cpp | 19 static size_t ScratchBlockSize(SkSBlockAllocator<N>& pool) { in ScratchBlockSize() argument 20 return (size_t) pool->scratchBlockSize(); in ScratchBlockSize() 26 static int block_count(const SkSBlockAllocator<N>& pool) { in block_count() argument 28 for (const Block* b : pool->blocks()) { in block_count() 36 static Block* get_block(SkSBlockAllocator<N>& pool, int blockIndex) { in get_block() argument 39 for (Block* b: pool->blocks()) { in get_block() 55 static size_t total_size(SkSBlockAllocator<N>& pool) { in total_size() argument 56 return pool->totalSize() - BlockAllocatorTestAccess::ScratchBlockSize(pool); in total_size() 60 static size_t add_block(SkSBlockAllocator<N>& pool) { in add_block() argument 61 size_t currentSize = total_size(pool); in add_block() [all …]
|
/third_party/skia/third_party/externals/microhttpd/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 …]
|
/third_party/ffmpeg/libavfilter/ |
D | framepool.c | 58 FFFramePool *pool; in ff_frame_pool_video_init() local 62 pool = av_mallocz(sizeof(FFFramePool)); in ff_frame_pool_video_init() 63 if (!pool) in ff_frame_pool_video_init() 66 pool->type = AVMEDIA_TYPE_VIDEO; in ff_frame_pool_video_init() 67 pool->width = width; in ff_frame_pool_video_init() 68 pool->height = height; in ff_frame_pool_video_init() 69 pool->format = format; in ff_frame_pool_video_init() 70 pool->align = align; in ff_frame_pool_video_init() 76 if (!pool->linesize[0]) { in ff_frame_pool_video_init() 77 ret = av_image_fill_linesizes(pool->linesize, pool->format, in ff_frame_pool_video_init() [all …]
|
/third_party/mesa3d/src/gallium/frontends/nine/ |
D | threadpool.c | 44 struct threadpool *pool = data; in threadpool_worker() local 46 pthread_mutex_lock(&pool->m); in threadpool_worker() 48 while (!pool->shutdown) { in threadpool_worker() 52 while (!pool->workqueue && !pool->shutdown) in threadpool_worker() 53 pthread_cond_wait(&pool->new_work, &pool->m); in threadpool_worker() 55 if (pool->shutdown) in threadpool_worker() 62 task = pool->workqueue; in threadpool_worker() 63 pool->workqueue = task->next; in threadpool_worker() 66 pthread_mutex_unlock(&pool->m); in threadpool_worker() 68 pthread_mutex_lock(&pool->m); in threadpool_worker() [all …]
|
/third_party/vk-gl-cts/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 …]
|
/third_party/mesa3d/src/gallium/drivers/r600/ |
D | compute_memory_pool.c | 48 static void compute_memory_shadow(struct compute_memory_pool* pool, 51 static void compute_memory_defrag(struct compute_memory_pool *pool, 55 static int compute_memory_promote_item(struct compute_memory_pool *pool, 59 static void compute_memory_move_item(struct compute_memory_pool *pool, 64 static void compute_memory_transfer(struct compute_memory_pool* pool, 75 struct compute_memory_pool* pool = (struct compute_memory_pool*) in compute_memory_pool_new() local 77 if (!pool) in compute_memory_pool_new() 82 pool->screen = rscreen; in compute_memory_pool_new() 83 pool->item_list = (struct list_head *) in compute_memory_pool_new() 85 pool->unallocated_list = (struct list_head *) in compute_memory_pool_new() [all …]
|
/third_party/mesa3d/src/panfrost/vulkan/ |
D | panvk_mempool.c | 44 panvk_pool_alloc_backing(struct panvk_pool *pool, size_t bo_sz) in panvk_pool_alloc_backing() argument 49 if (pool->bo_pool && bo_sz == pool->base.slab_size && in panvk_pool_alloc_backing() 50 util_dynarray_num_elements(&pool->bo_pool->free_bos, struct panfrost_bo *)) { in panvk_pool_alloc_backing() 51 bo = util_dynarray_pop(&pool->bo_pool->free_bos, struct panfrost_bo *); in panvk_pool_alloc_backing() 59 bo = panfrost_bo_create(pool->base.dev, bo_sz, in panvk_pool_alloc_backing() 60 pool->base.create_flags, in panvk_pool_alloc_backing() 61 pool->base.label); in panvk_pool_alloc_backing() 64 if (bo->size == pool->base.slab_size) in panvk_pool_alloc_backing() 65 util_dynarray_append(&pool->bos, struct panfrost_bo *, bo); in panvk_pool_alloc_backing() 67 util_dynarray_append(&pool->big_bos, struct panfrost_bo *, bo); in panvk_pool_alloc_backing() [all …]
|
/third_party/mesa3d/src/util/ |
D | slab.c | 125 void slab_create_child(struct slab_child_pool *pool, in slab_create_child() argument 128 pool->parent = parent; in slab_create_child() 129 pool->pages = NULL; in slab_create_child() 130 pool->free = NULL; in slab_create_child() 131 pool->migrated = NULL; in slab_create_child() 140 void slab_destroy_child(struct slab_child_pool *pool) in slab_destroy_child() argument 142 if (!pool->parent) in slab_destroy_child() 145 simple_mtx_lock(&pool->parent->mutex); in slab_destroy_child() 147 while (pool->pages) { in slab_destroy_child() 148 struct slab_page_header *page = pool->pages; in slab_destroy_child() [all …]
|
/third_party/mesa3d/src/gallium/drivers/llvmpipe/ |
D | lp_cs_tpool.c | 38 struct lp_cs_tpool *pool = data; in lp_cs_tpool_worker() local 42 mtx_lock(&pool->m); in lp_cs_tpool_worker() 44 while (!pool->shutdown) { in lp_cs_tpool_worker() 48 while (list_is_empty(&pool->workqueue) && !pool->shutdown) in lp_cs_tpool_worker() 49 cnd_wait(&pool->new_work, &pool->m); in lp_cs_tpool_worker() 51 if (pool->shutdown) in lp_cs_tpool_worker() 54 task = list_first_entry(&pool->workqueue, struct lp_cs_tpool_task, in lp_cs_tpool_worker() 72 mtx_unlock(&pool->m); in lp_cs_tpool_worker() 76 mtx_lock(&pool->m); in lp_cs_tpool_worker() 81 mtx_unlock(&pool->m); in lp_cs_tpool_worker() [all …]
|
/third_party/ffmpeg/libavutil/ |
D | buffer.c | 263 AVBufferPool *pool = av_mallocz(sizeof(*pool)); in av_buffer_pool_init2() local 264 if (!pool) in av_buffer_pool_init2() 267 ff_mutex_init(&pool->mutex, NULL); in av_buffer_pool_init2() 269 pool->size = size; in av_buffer_pool_init2() 270 pool->opaque = opaque; in av_buffer_pool_init2() 271 pool->alloc2 = alloc; in av_buffer_pool_init2() 272 pool->alloc = av_buffer_alloc; // fallback in av_buffer_pool_init2() 273 pool->pool_free = pool_free; in av_buffer_pool_init2() 275 atomic_init(&pool->refcount, 1); in av_buffer_pool_init2() 277 return pool; in av_buffer_pool_init2() [all …]
|
/third_party/mesa3d/src/broadcom/vulkan/ |
D | v3dv_query.c | 120 struct v3dv_query_pool *pool, in kperfmon_create() argument 123 for (uint32_t i = 0; i < pool->perfmon.nperfmons; i++) { in kperfmon_create() 124 assert(i * DRM_V3D_MAX_PERF_COUNTERS < pool->perfmon.ncounters); in kperfmon_create() 127 .ncounters = MIN2(pool->perfmon.ncounters - in kperfmon_create() 132 &pool->perfmon.counters[i * DRM_V3D_MAX_PERF_COUNTERS], in kperfmon_create() 141 pool->queries[query].perf.kperfmon_ids[i] = req.id; in kperfmon_create() 147 struct v3dv_query_pool *pool, in kperfmon_destroy() argument 151 if (!pool->queries[query].perf.kperfmon_ids[0]) in kperfmon_destroy() 154 for (uint32_t i = 0; i < pool->perfmon.nperfmons; i++) { in kperfmon_destroy() 156 .id = pool->queries[query].perf.kperfmon_ids[i] in kperfmon_destroy() [all …]
|
/third_party/mesa3d/src/intel/vulkan/ |
D | anv_allocator.c | 365 anv_block_pool_expand_range(struct anv_block_pool *pool, 369 anv_block_pool_init(struct anv_block_pool *pool, in anv_block_pool_init() argument 383 pool->name = name; in anv_block_pool_init() 384 pool->device = device; in anv_block_pool_init() 385 pool->use_relocations = anv_use_relocations(device->physical); in anv_block_pool_init() 386 pool->nbos = 0; in anv_block_pool_init() 387 pool->size = 0; in anv_block_pool_init() 388 pool->center_bo_offset = 0; in anv_block_pool_init() 389 pool->start_address = intel_canonical_address(start_address); in anv_block_pool_init() 390 pool->map = NULL; in anv_block_pool_init() [all …]
|
D | genX_query.c | 54 anv_query_address(struct anv_query_pool *pool, uint32_t query) in anv_query_address() argument 57 .bo = pool->bo, in anv_query_address() 58 .offset = query * pool->stride, in anv_query_address() 94 VK_MULTIALLOC_DECL(&ma, struct anv_query_pool, pool, 1); in genX() 174 pool->type = pCreateInfo->queryType; in genX() 175 pool->pipeline_statistics = pipeline_statistics; in genX() 176 pool->stride = uint64s_per_slot * sizeof(uint64_t); in genX() 177 pool->slots = pCreateInfo->queryCount; in genX() 179 if (pool->type == VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL) { in genX() 180 pool->data_offset = data_offset; in genX() [all …]
|
/third_party/mesa3d/src/gallium/drivers/panfrost/ |
D | pan_mempool.c | 47 panfrost_pool_alloc_backing(struct panfrost_pool *pool, size_t bo_sz) in panfrost_pool_alloc_backing() argument 55 struct panfrost_bo *bo = panfrost_bo_create(pool->base.dev, bo_sz, in panfrost_pool_alloc_backing() 56 pool->base.create_flags, pool->base.label); in panfrost_pool_alloc_backing() 58 if (pool->owned) in panfrost_pool_alloc_backing() 59 util_dynarray_append(&pool->bos, struct panfrost_bo *, bo); in panfrost_pool_alloc_backing() 61 panfrost_bo_unreference(pool->transient_bo); in panfrost_pool_alloc_backing() 63 pool->transient_bo = bo; in panfrost_pool_alloc_backing() 64 pool->transient_offset = 0; in panfrost_pool_alloc_backing() 70 panfrost_pool_init(struct panfrost_pool *pool, void *memctx, in panfrost_pool_init() argument 75 memset(pool, 0, sizeof(*pool)); in panfrost_pool_init() [all …]
|
/third_party/mesa3d/src/freedreno/vulkan/ |
D | tu_query.c | 98 #define query_iova(type, pool, query, field) \ argument 99 pool->bo->iova + pool->stride * (query) + offsetof(type, field) 101 #define occlusion_query_iova(pool, query, field) \ argument 102 query_iova(struct occlusion_query_slot, pool, query, field) 104 #define pipeline_stat_query_iova(pool, query, field) \ argument 105 pool->bo->iova + pool->stride * (query) + \ 108 #define primitive_query_iova(pool, query, field, i) \ argument 109 query_iova(struct primitive_query_slot, pool, query, field) + \ 112 #define perf_query_iova(pool, query, field, i) \ argument 113 pool->bo->iova + pool->stride * (query) + \ [all …]
|
/third_party/libunwind/libunwind/src/mi/ |
D | mempool.c | 69 free_object (struct mempool *pool, void *object) in free_object() argument 73 obj->next = pool->free_list; in free_object() 74 pool->free_list = obj; in free_object() 75 ++pool->num_free; in free_object() 79 add_memory (struct mempool *pool, char *mem, size_t size, size_t obj_size) in add_memory() argument 84 free_object (pool, obj); in add_memory() 88 expand (struct mempool *pool) in expand() argument 93 size = pool->chunk_size; in expand() 97 size = UNW_ALIGN(pool->obj_size, pg_size); in expand() 102 size = pool->obj_size; in expand() [all …]
|
/third_party/nghttp2/src/ |
D | memchunk_test.cc | 37 MemchunkPool pool; in test_pool_recycle() local 39 CU_ASSERT(!pool.pool); in test_pool_recycle() 40 CU_ASSERT(0 == pool.poolsize); in test_pool_recycle() 41 CU_ASSERT(nullptr == pool.freelist); in test_pool_recycle() 43 auto m1 = pool.get(); in test_pool_recycle() 45 CU_ASSERT(m1 == pool.pool); in test_pool_recycle() 46 CU_ASSERT(MemchunkPool::value_type::size == pool.poolsize); in test_pool_recycle() 47 CU_ASSERT(nullptr == pool.freelist); in test_pool_recycle() 49 auto m2 = pool.get(); in test_pool_recycle() 51 CU_ASSERT(m2 == pool.pool); in test_pool_recycle() [all …]
|
/third_party/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 …]
|
/third_party/ffmpeg/libavcodec/ |
D | get_buffer.c | 57 FramePool *pool = (FramePool*)data; in frame_pool_free() local 60 for (i = 0; i < FF_ARRAY_ELEMS(pool->pools); i++) in frame_pool_free() 61 av_buffer_pool_uninit(&pool->pools[i]); in frame_pool_free() 68 FramePool *pool = av_mallocz(sizeof(*pool)); in frame_pool_alloc() local 71 if (!pool) in frame_pool_alloc() 74 buf = av_buffer_create((uint8_t*)pool, sizeof(*pool), in frame_pool_alloc() 77 av_freep(&pool); in frame_pool_alloc() 86 FramePool *pool = avctx->internal->pool ? in update_frame_pool() local 87 (FramePool*)avctx->internal->pool->data : NULL; in update_frame_pool() 103 if (pool && pool->format == frame->format) { in update_frame_pool() [all …]
|
/third_party/protobuf/python/google/protobuf/internal/ |
D | descriptor_pool_test.py | 74 file_desc1 = self.pool.FindFileByName(name1) 81 file_desc2 = self.pool.FindFileByName(name2) 89 self.pool.FindFileByName('Does not exist') 92 file_desc1 = self.pool.FindFileContainingSymbol( 100 file_desc2 = self.pool.FindFileContainingSymbol( 109 file_desc3 = self.pool.FindFileContainingSymbol( 116 file_desc4 = self.pool.FindFileContainingSymbol( 122 file_desc5 = self.pool.FindFileContainingSymbol( 136 file_desc6 = self.pool.FindFileContainingSymbol( 143 file_desc7 = self.pool.FindFileContainingSymbol( [all …]
|
/third_party/mesa3d/src/asahi/lib/ |
D | pool.c | 37 agx_pool_alloc_backing(struct agx_pool *pool, size_t bo_sz) in agx_pool_alloc_backing() argument 39 struct agx_bo *bo = agx_bo_create(pool->dev, bo_sz, in agx_pool_alloc_backing() 40 pool->create_flags); in agx_pool_alloc_backing() 42 util_dynarray_append(&pool->bos, struct agx_bo *, bo); in agx_pool_alloc_backing() 43 pool->transient_bo = bo; in agx_pool_alloc_backing() 44 pool->transient_offset = 0; in agx_pool_alloc_backing() 50 agx_pool_init(struct agx_pool *pool, struct agx_device *dev, in agx_pool_init() argument 53 memset(pool, 0, sizeof(*pool)); in agx_pool_init() 54 pool->dev = dev; in agx_pool_init() 55 pool->create_flags = create_flags; in agx_pool_init() [all …]
|
/third_party/node/deps/undici/src/lib/ |
D | balanced-pool.js | 70 if (this[kClients].find((pool) => ( 71 pool[kUrl].origin === upstreamOrigin && 72 pool.closed !== true && 73 pool.destroyed !== true 77 const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) 79 this[kAddClient](pool) 80 pool.on('connect', () => { 81 pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) 84 pool.on('connectionError', () => { 85 pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) [all …]
|
/third_party/mesa3d/src/virtio/vulkan/ |
D | vn_feedback.c | 139 vn_feedback_pool_grow_locked(struct vn_feedback_pool *pool) in vn_feedback_pool_grow_locked() argument 145 result = vn_feedback_buffer_create(pool->device, pool->size, pool->alloc, in vn_feedback_pool_grow_locked() 150 pool->used = 0; in vn_feedback_pool_grow_locked() 152 list_add(&feedback_buf->head, &pool->feedback_buffers); in vn_feedback_pool_grow_locked() 159 struct vn_feedback_pool *pool, in vn_feedback_pool_init() argument 163 simple_mtx_init(&pool->mutex, mtx_plain); in vn_feedback_pool_init() 165 pool->device = dev; in vn_feedback_pool_init() 166 pool->alloc = alloc; in vn_feedback_pool_init() 167 pool->size = size; in vn_feedback_pool_init() 168 pool->used = size; in vn_feedback_pool_init() [all …]
|