/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/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/gstreamer/gstplugins_good/sys/v4l2/ |
D | gstv4l2bufferpool.c | 125 gst_v4l2_buffer_pool_copy_buffer (GstV4l2BufferPool * pool, GstBuffer * dest, in gst_v4l2_buffer_pool_copy_buffer() argument 128 const GstVideoFormatInfo *finfo = pool->caps_info.finfo; in gst_v4l2_buffer_pool_copy_buffer() 130 GST_LOG_OBJECT (pool, "copying buffer"); in gst_v4l2_buffer_pool_copy_buffer() 136 GST_DEBUG_OBJECT (pool, "copy video frame"); in gst_v4l2_buffer_pool_copy_buffer() 139 if (!gst_video_frame_map (&src_frame, &pool->caps_info, src, GST_MAP_READ)) in gst_v4l2_buffer_pool_copy_buffer() 142 if (!gst_video_frame_map (&dest_frame, &pool->caps_info, dest, in gst_v4l2_buffer_pool_copy_buffer() 155 GST_DEBUG_OBJECT (pool, "copy raw bytes"); in gst_v4l2_buffer_pool_copy_buffer() 169 GST_CAT_LOG_OBJECT (CAT_PERFORMANCE, pool, "slow copy into buffer %p", dest); in gst_v4l2_buffer_pool_copy_buffer() 175 GST_ERROR_OBJECT (pool, "could not map buffer"); in gst_v4l2_buffer_pool_copy_buffer() 214 gst_v4l2_buffer_pool_import_userptr (GstV4l2BufferPool * pool, in gst_v4l2_buffer_pool_import_userptr() argument [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/iowow/src/utils/ |
D | iwpool.c | 29 IWPOOL *pool; in iwpool_create() local 32 pool = malloc(sizeof(*pool)); in iwpool_create() 33 if (!pool) { in iwpool_create() 36 pool->unit = malloc(sizeof(*pool->unit)); in iwpool_create() 37 if (!pool->unit) { in iwpool_create() 40 pool->unit->heap = malloc(siz); in iwpool_create() 41 if (!pool->unit->heap) { in iwpool_create() 44 pool->asiz = siz; in iwpool_create() 45 pool->heap = pool->unit->heap; in iwpool_create() 46 pool->usiz = 0; in iwpool_create() [all …]
|
/third_party/ffmpeg/libavfilter/ |
D | framepool.c | 58 FFFramePool *pool; in ff_frame_pool_video_init() local 64 pool = av_mallocz(sizeof(FFFramePool)); in ff_frame_pool_video_init() 65 if (!pool) in ff_frame_pool_video_init() 68 pool->type = AVMEDIA_TYPE_VIDEO; in ff_frame_pool_video_init() 69 pool->width = width; in ff_frame_pool_video_init() 70 pool->height = height; in ff_frame_pool_video_init() 71 pool->format = format; in ff_frame_pool_video_init() 72 pool->align = align; in ff_frame_pool_video_init() 78 if (!pool->linesize[0]) { in ff_frame_pool_video_init() 80 ret = av_image_fill_linesizes(pool->linesize, pool->format, in ff_frame_pool_video_init() [all …]
|
/third_party/gstreamer/gstreamer/gst/ |
D | gsttaskpool.c | 61 default_func (TaskData * tdata, GstTaskPool * pool) in default_func() argument 74 default_prepare (GstTaskPool * pool, GError ** error) in default_prepare() argument 76 GST_OBJECT_LOCK (pool); in default_prepare() 77 pool->pool = g_thread_pool_new ((GFunc) default_func, pool, -1, FALSE, error); in default_prepare() 78 GST_OBJECT_UNLOCK (pool); in default_prepare() 82 default_cleanup (GstTaskPool * pool) in default_cleanup() argument 86 GST_OBJECT_LOCK (pool); in default_cleanup() 87 pool_ = pool->pool; in default_cleanup() 88 pool->pool = NULL; in default_cleanup() 89 GST_OBJECT_UNLOCK (pool); in default_cleanup() [all …]
|
D | gstbufferpool.c | 90 #define GST_BUFFER_POOL_LOCK(pool) (g_rec_mutex_lock(&pool->priv->rec_lock)) argument 91 #define GST_BUFFER_POOL_UNLOCK(pool) (g_rec_mutex_unlock(&pool->priv->rec_lock)) argument 120 static gboolean default_start (GstBufferPool * pool); 121 static gboolean default_stop (GstBufferPool * pool); 122 static gboolean default_set_config (GstBufferPool * pool, 124 static GstFlowReturn default_alloc_buffer (GstBufferPool * pool, 126 static GstFlowReturn default_acquire_buffer (GstBufferPool * pool, 128 static void default_reset_buffer (GstBufferPool * pool, GstBuffer * buffer); 129 static void default_free_buffer (GstBufferPool * pool, GstBuffer * buffer); 130 static void default_release_buffer (GstBufferPool * pool, GstBuffer * buffer); [all …]
|
/third_party/gstreamer/gstplugins_bad/gst-libs/gst/vulkan/ |
D | gstvkcommandpool.c | 37 #define GET_PRIV(pool) gst_vulkan_command_pool_get_instance_private (pool) argument 60 gst_vulkan_command_pool_init (GstVulkanCommandPool * pool) in gst_vulkan_command_pool_init() argument 62 GstVulkanCommandPoolPrivate *priv = GET_PRIV (pool); in gst_vulkan_command_pool_init() 85 GstVulkanCommandPool *pool = GST_VULKAN_COMMAND_POOL (object); in gst_vulkan_command_pool_finalize() local 86 GstVulkanCommandPoolPrivate *priv = GET_PRIV (pool); in gst_vulkan_command_pool_finalize() 88 gst_vulkan_command_pool_lock (pool); in gst_vulkan_command_pool_finalize() 91 gst_vulkan_command_pool_unlock (pool); in gst_vulkan_command_pool_finalize() 97 if (pool->pool) in gst_vulkan_command_pool_finalize() 98 vkDestroyCommandPool (pool->queue->device->device, pool->pool, NULL); in gst_vulkan_command_pool_finalize() 99 pool->pool = VK_NULL_HANDLE; in gst_vulkan_command_pool_finalize() [all …]
|
D | gstvkhandlepool.c | 48 gst_vulkan_handle_pool_default_alloc (GstVulkanHandlePool * pool, in gst_vulkan_handle_pool_default_alloc() argument 55 gst_vulkan_handle_pool_default_acquire (GstVulkanHandlePool * pool, in gst_vulkan_handle_pool_default_acquire() argument 60 GST_OBJECT_LOCK (pool); in gst_vulkan_handle_pool_default_acquire() 61 if (pool->available->len > 0) { in gst_vulkan_handle_pool_default_acquire() 62 ret = g_ptr_array_remove_index_fast (pool->available, 0); in gst_vulkan_handle_pool_default_acquire() 64 ret = gst_vulkan_handle_pool_alloc (pool, error); in gst_vulkan_handle_pool_default_acquire() 68 g_ptr_array_add (pool->outstanding, ret); in gst_vulkan_handle_pool_default_acquire() 71 if (pool->outstanding->len > GST_VULKAN_HANDLE_POOL_LARGE_OUTSTANDING) in gst_vulkan_handle_pool_default_acquire() 74 GST_OBJECT_NAME (pool)); in gst_vulkan_handle_pool_default_acquire() 77 GST_OBJECT_UNLOCK (pool); in gst_vulkan_handle_pool_default_acquire() [all …]
|
D | gstvkdescriptorpool.c | 34 #define GET_PRIV(pool) gst_vulkan_descriptor_pool_get_instance_private (pool) argument 54 gst_vulkan_descriptor_pool_init (GstVulkanDescriptorPool * pool) in gst_vulkan_descriptor_pool_init() argument 70 GstVulkanDescriptorPool *pool = GST_VULKAN_DESCRIPTOR_POOL (object); in gst_vulkan_descriptor_pool_finalize() local 72 GstVulkanDescriptorPoolPrivate *priv = GET_PRIV (pool); in gst_vulkan_descriptor_pool_finalize() 80 if (pool->pool) in gst_vulkan_descriptor_pool_finalize() 81 vkDestroyDescriptorPool (pool->device->device, pool->pool, NULL); in gst_vulkan_descriptor_pool_finalize() 82 pool->pool = VK_NULL_HANDLE; in gst_vulkan_descriptor_pool_finalize() 84 gst_clear_object (&pool->device); in gst_vulkan_descriptor_pool_finalize() 101 VkDescriptorPool pool, gsize max_sets) in gst_vulkan_descriptor_pool_new_wrapped() argument 107 g_return_val_if_fail (pool != VK_NULL_HANDLE, NULL); in gst_vulkan_descriptor_pool_new_wrapped() [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/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/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/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/gstreamer/gstreamer/tests/check/gst/ |
D | gstbufferpool.c | 30 GstBufferPool *pool = gst_buffer_pool_new (); in create_pool() local 31 GstStructure *conf = gst_buffer_pool_get_config (pool); in create_pool() 35 gst_buffer_pool_set_config (pool, conf); in create_pool() 38 return pool; in create_pool() 64 GstBufferPool *pool = create_pool (10, 0, 0); in GST_START_TEST() local 67 gst_buffer_pool_set_active (pool, TRUE); in GST_START_TEST() 68 gst_buffer_pool_acquire_buffer (pool, &buf, NULL); in GST_START_TEST() 72 gst_buffer_pool_set_active (pool, FALSE); in GST_START_TEST() 73 gst_object_unref (pool); in GST_START_TEST() 81 GstBufferPool *pool = create_pool (10, 0, 0); in GST_START_TEST() local [all …]
|
/third_party/ffmpeg/libavutil/ |
D | buffer.c | 249 AVBufferPool *pool = av_mallocz(sizeof(*pool)); in av_buffer_pool_init2() local 250 if (!pool) in av_buffer_pool_init2() 253 ff_mutex_init(&pool->mutex, NULL); in av_buffer_pool_init2() 255 pool->size = size; in av_buffer_pool_init2() 256 pool->opaque = opaque; in av_buffer_pool_init2() 257 pool->alloc2 = alloc; in av_buffer_pool_init2() 258 pool->alloc = av_buffer_alloc; // fallback in av_buffer_pool_init2() 259 pool->pool_free = pool_free; in av_buffer_pool_init2() 261 atomic_init(&pool->refcount, 1); in av_buffer_pool_init2() 263 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/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/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 …]
|
/third_party/libunwind/src/mi/ |
D | mempool.c | 75 free_object (struct mempool *pool, void *object) in free_object() argument 79 obj->next = pool->free_list; in free_object() 80 pool->free_list = obj; in free_object() 81 ++pool->num_free; in free_object() 85 add_memory (struct mempool *pool, char *mem, size_t size, size_t obj_size) in add_memory() argument 90 free_object (pool, obj); in add_memory() 94 expand (struct mempool *pool) in expand() argument 99 size = pool->chunk_size; in expand() 103 size = UNW_ALIGN(pool->obj_size, pg_size); in expand() 108 size = pool->obj_size; in expand() [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/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 …]
|