Home
last modified time | relevance | path

Searched refs:pool (Results 1 – 25 of 1371) sorted by relevance

12345678910>>...55

/third_party/openssl/crypto/rand/
Drand_lib.c52 size_t rand_acquire_entropy_from_tsc(RAND_POOL *pool) in rand_acquire_entropy_from_tsc() argument
60 rand_pool_add(pool, &c, 1, 4); in rand_acquire_entropy_from_tsc()
63 return rand_pool_entropy_available(pool); in rand_acquire_entropy_from_tsc()
85 size_t rand_acquire_entropy_from_cpu(RAND_POOL *pool) in rand_acquire_entropy_from_cpu() argument
90 bytes_needed = rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); in rand_acquire_entropy_from_cpu()
92 buffer = rand_pool_add_begin(pool, bytes_needed); in rand_acquire_entropy_from_cpu()
99 rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); in rand_acquire_entropy_from_cpu()
104 rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); in rand_acquire_entropy_from_cpu()
107 rand_pool_add_end(pool, 0, 0); in rand_acquire_entropy_from_cpu()
112 return rand_pool_entropy_available(pool); in rand_acquire_entropy_from_cpu()
[all …]
/third_party/skia/tests/
DSkBlockAllocatorTest.cpp19 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/
Dmemorypool.c89 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/gstreamer/gstplugins_good/sys/v4l2/
Dgstv4l2bufferpool.c125 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/iowow/src/utils/
Diwpool.c29 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/
Dframepool.c58 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/
Dgsttaskpool.c61 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 …]
Dgstbufferpool.c90 #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/
Dgstvkcommandpool.c37 #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 …]
Dgstvkhandlepool.c48 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 …]
Dgstvkdescriptorpool.c34 #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/
Dthreadpool.c44 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/mesa3d/src/gallium/drivers/r600/
Dcompute_memory_pool.c48 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/glib/glib/
Dgthreadpool.c91 GThreadPool pool; member
123 GThreadPool *pool; member
131 static void g_thread_pool_queue_push_unlocked (GRealThreadPool *pool,
133 static void g_thread_pool_free_internal (GRealThreadPool *pool);
135 static gboolean g_thread_pool_start_thread (GRealThreadPool *pool,
137 static void g_thread_pool_wakeup_and_stop_all (GRealThreadPool *pool);
139 static gpointer g_thread_pool_wait_for_new_task (GRealThreadPool *pool);
142 g_thread_pool_queue_push_unlocked (GRealThreadPool *pool, in g_thread_pool_queue_push_unlocked() argument
145 if (pool->sort_func) in g_thread_pool_queue_push_unlocked()
146 g_async_queue_push_sorted_unlocked (pool->queue, in g_thread_pool_queue_push_unlocked()
[all …]
/third_party/mesa3d/src/panfrost/vulkan/
Dpanvk_mempool.c44 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/vk-gl-cts/framework/delibs/depool/
DdeMemPool.c171 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/wayland_standard/src/
Dwayland-shm.c75 struct wl_shm_pool *pool; member
85 shm_pool_finish_resize(struct wl_shm_pool *pool) in shm_pool_finish_resize() argument
89 if (pool->size == pool->new_size) in shm_pool_finish_resize()
92 data = mremap(pool->data, pool->size, pool->new_size, MREMAP_MAYMOVE); in shm_pool_finish_resize()
94 wl_resource_post_error(pool->resource, in shm_pool_finish_resize()
100 pool->data = data; in shm_pool_finish_resize()
101 pool->size = pool->new_size; in shm_pool_finish_resize()
105 shm_pool_unref(struct wl_shm_pool *pool, bool external) in shm_pool_unref() argument
108 pool->external_refcount--; in shm_pool_unref()
109 if (pool->external_refcount == 0) in shm_pool_unref()
[all …]
/third_party/mesa3d/src/gallium/drivers/llvmpipe/
Dlp_cs_tpool.c38 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/
Dgstbufferpool.c30 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/mesa3d/src/util/
Dslab.c124 void slab_create_child(struct slab_child_pool *pool, in slab_create_child() argument
127 pool->parent = parent; in slab_create_child()
128 pool->pages = NULL; in slab_create_child()
129 pool->free = NULL; in slab_create_child()
130 pool->migrated = NULL; in slab_create_child()
139 void slab_destroy_child(struct slab_child_pool *pool) in slab_destroy_child() argument
141 if (!pool->parent) in slab_destroy_child()
144 simple_mtx_lock(&pool->parent->mutex); in slab_destroy_child()
146 while (pool->pages) { in slab_destroy_child()
147 struct slab_page_header *page = pool->pages; in slab_destroy_child()
[all …]
/third_party/ffmpeg/libavutil/
Dbuffer.c249 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/gallium/drivers/panfrost/
Dpan_mempool.c44 panfrost_pool_alloc_backing(struct panfrost_pool *pool, size_t bo_sz) in panfrost_pool_alloc_backing() argument
52 struct panfrost_bo *bo = panfrost_bo_create(pool->base.dev, bo_sz, in panfrost_pool_alloc_backing()
53 pool->base.create_flags, pool->base.label); in panfrost_pool_alloc_backing()
55 if (pool->owned) in panfrost_pool_alloc_backing()
56 util_dynarray_append(&pool->bos, struct panfrost_bo *, bo); in panfrost_pool_alloc_backing()
58 panfrost_bo_unreference(pool->transient_bo); in panfrost_pool_alloc_backing()
60 pool->transient_bo = bo; in panfrost_pool_alloc_backing()
61 pool->transient_offset = 0; in panfrost_pool_alloc_backing()
67 panfrost_pool_init(struct panfrost_pool *pool, void *memctx, in panfrost_pool_init() argument
72 memset(pool, 0, sizeof(*pool)); in panfrost_pool_init()
[all …]
/third_party/libunwind/src/mi/
Dmempool.c69 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/mesa3d/src/broadcom/vulkan/
Dv3dv_query.c38 struct v3dv_query_pool *pool = in v3dv_CreateQueryPool() local
39 vk_object_zalloc(&device->vk, pAllocator, sizeof(*pool), in v3dv_CreateQueryPool()
41 if (pool == NULL) in v3dv_CreateQueryPool()
44 pool->query_type = pCreateInfo->queryType; in v3dv_CreateQueryPool()
45 pool->query_count = pCreateInfo->queryCount; in v3dv_CreateQueryPool()
49 const uint32_t pool_bytes = sizeof(struct v3dv_query) * pool->query_count; in v3dv_CreateQueryPool()
50 pool->queries = vk_alloc2(&device->vk.alloc, pAllocator, pool_bytes, 8, in v3dv_CreateQueryPool()
52 if (pool->queries == NULL) { in v3dv_CreateQueryPool()
57 if (pool->query_type == VK_QUERY_TYPE_OCCLUSION) { in v3dv_CreateQueryPool()
62 const uint32_t query_groups = DIV_ROUND_UP(pool->query_count, 16); in v3dv_CreateQueryPool()
[all …]
/third_party/mesa3d/src/gallium/drivers/r300/compiler/
Dmemory_pool.c38 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 …]

12345678910>>...55