Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 2513) sorted by relevance

12345678910>>...101

/linux/drivers/android/
A Dbinder_alloc.c64 return alloc->buffer + alloc->buffer_size - buffer->user_data; in binder_alloc_buffer_size()
204 page = &alloc->pages[(page_addr - alloc->buffer) / PAGE_SIZE]; in binder_update_page_range()
256 page->alloc = alloc; in binder_update_page_range()
325 alloc->vma = vma; in binder_alloc_set_vma()
333 if (alloc->vma) { in binder_alloc_get_vma()
539 alloc->pid, size, alloc->free_async_space); in binder_alloc_new_buf_locked()
540 if (alloc->free_async_space < alloc->buffer_size / 10) { in binder_alloc_new_buf_locked()
678 alloc->pid, size, alloc->free_async_space); in binder_free_buf_locked()
769 alloc->pages = kcalloc(alloc->buffer_size / PAGE_SIZE, in binder_alloc_mmap_handler()
789 alloc->free_async_space = alloc->buffer_size / 2; in binder_alloc_mmap_handler()
[all …]
A Dbinder_alloc_selftest.c104 if (!alloc->pages[page_index].page_ptr || in check_buffer_pages_allocated()
105 !list_empty(&alloc->pages[page_index].lru)) { in check_buffer_pages_allocated()
107 alloc->pages[page_index].page_ptr ? in check_buffer_pages_allocated()
139 binder_alloc_free_buf(alloc, buffers[seq[i]]); in binder_selftest_free_buf()
147 if (list_empty(&alloc->pages[i].lru)) { in binder_selftest_free_buf()
167 if (alloc->pages[i].page_ptr) { in binder_selftest_free_page()
169 list_empty(&alloc->pages[i].lru) ? in binder_selftest_free_page()
190 binder_selftest_free_page(alloc); in binder_selftest_alloc_free()
246 binder_selftest_free_seq(alloc, back_sizes, seq, 0, alloc->buffer_size); in binder_selftest_alloc_size()
256 binder_selftest_alloc_size(alloc, end_offset); in binder_selftest_alloc_offset()
[all …]
A Dbinder_alloc.h72 struct binder_alloc *alloc; member
119 void binder_selftest_alloc(struct binder_alloc *alloc);
132 extern void binder_alloc_init(struct binder_alloc *alloc);
136 binder_alloc_prepare_to_free(struct binder_alloc *alloc,
145 struct binder_alloc *alloc);
147 struct binder_alloc *alloc);
160 mutex_lock(&alloc->mutex); in binder_alloc_get_free_async_space()
161 free_async_space = alloc->free_async_space; in binder_alloc_get_free_async_space()
162 mutex_unlock(&alloc->mutex); in binder_alloc_get_free_async_space()
167 binder_alloc_copy_user_to_buffer(struct binder_alloc *alloc,
[all …]
A Dbinder_trace.h325 __entry->proc = alloc->pid;
337 TP_ARGS(alloc, page_index),
343 __entry->proc = alloc->pid;
352 TP_ARGS(alloc, page_index));
356 TP_ARGS(alloc, page_index));
360 TP_ARGS(alloc, page_index));
364 TP_ARGS(alloc, page_index));
368 TP_ARGS(alloc, page_index));
372 TP_ARGS(alloc, page_index));
376 TP_ARGS(alloc, page_index));
[all …]
/linux/drivers/infiniband/hw/cxgb4/
A Did_table.c51 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in c4iw_id_alloc()
53 obj = find_first_zero_bit(alloc->table, alloc->max); in c4iw_id_alloc()
60 if (alloc->last >= alloc->max) in c4iw_id_alloc()
61 alloc->last = 0; in c4iw_id_alloc()
63 obj += alloc->start; in c4iw_id_alloc()
75 obj -= alloc->start; in c4iw_id_free()
87 alloc->start = start; in c4iw_id_table_alloc()
92 alloc->last = 0; in c4iw_id_table_alloc()
93 alloc->max = num; in c4iw_id_table_alloc()
97 if (!alloc->table) in c4iw_id_table_alloc()
[all …]
/linux/sound/isa/gus/
A Dgus_mem.c36 pblock = alloc->first; in snd_gf1_mem_xalloc()
43 alloc->first = nblock; in snd_gf1_mem_xalloc()
52 if (alloc->last == NULL) { in snd_gf1_mem_xalloc()
54 alloc->first = alloc->last = nblock; in snd_gf1_mem_xalloc()
56 nblock->prev = alloc->last; in snd_gf1_mem_xalloc()
58 alloc->last = nblock; in snd_gf1_mem_xalloc()
79 if (alloc->last == block) { in snd_gf1_mem_xfree()
80 alloc->last = block->prev; in snd_gf1_mem_xfree()
125 struct snd_gf1_bank_info *info = w_16 ? alloc->banks_16 : alloc->banks_8; in snd_gf1_mem_find()
230 alloc->first = alloc->last = NULL; in snd_gf1_mem_init()
[all …]
/linux/drivers/infiniband/hw/mthca/
A Dmthca_allocator.c47 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in mthca_alloc()
49 alloc->top = (alloc->top + alloc->max) & alloc->mask; in mthca_alloc()
50 obj = find_first_zero_bit(alloc->table, alloc->max); in mthca_alloc()
55 obj |= alloc->top; in mthca_alloc()
73 alloc->last = min(alloc->last, obj); in mthca_free()
74 alloc->top = (alloc->top + alloc->max) & alloc->mask; in mthca_free()
88 alloc->last = 0; in mthca_alloc_init()
89 alloc->top = 0; in mthca_alloc_init()
90 alloc->max = num; in mthca_alloc_init()
91 alloc->mask = mask; in mthca_alloc_init()
[all …]
A Dmthca_uar.c40 uar->index = mthca_alloc(&dev->uar_table.alloc); in mthca_uar_alloc()
51 mthca_free(&dev->uar_table.alloc, uar->index); in mthca_uar_free()
58 ret = mthca_alloc_init(&dev->uar_table.alloc, in mthca_init_uar_table()
67 mthca_alloc_cleanup(&dev->uar_table.alloc); in mthca_init_uar_table()
77 mthca_alloc_cleanup(&dev->uar_table.alloc); in mthca_cleanup_uar_table()
A Dmthca_pd.c46 pd->pd_num = mthca_alloc(&dev->pd_table.alloc); in mthca_pd_alloc()
56 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_alloc()
66 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_free()
71 return mthca_alloc_init(&dev->pd_table.alloc, in mthca_init_pd_table()
80 mthca_alloc_cleanup(&dev->pd_table.alloc); in mthca_cleanup_pd_table()
/linux/fs/ocfs2/
A Dlocalalloc.c38 struct ocfs2_dinode *alloc,
46 struct ocfs2_dinode *alloc,
306 la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_load_local_alloc()
483 struct ocfs2_dinode *alloc; in ocfs2_begin_local_alloc_recovery() local
619 struct ocfs2_dinode *alloc; in ocfs2_reserve_local_alloc_bits() local
723 struct ocfs2_dinode *alloc; in ocfs2_claim_local_alloc_bits() local
730 la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_claim_local_alloc_bits()
779 struct ocfs2_dinode *alloc; in ocfs2_free_local_alloc_bits() local
786 la = OCFS2_LOCAL_ALLOC(alloc); in ocfs2_free_local_alloc_bits()
916 alloc->id1.bitmap1.i_used = 0; in ocfs2_clear_local_alloc()
[all …]
/linux/fs/xfs/libxfs/
A Dxfs_alloc_btree.c128 len = rec->alloc.ar_blockcount; in xfs_allocbt_update_lastrec()
134 len = rec->alloc.ar_blockcount; in xfs_allocbt_update_lastrec()
184 key->alloc.ar_startblock = rec->alloc.ar_startblock; in xfs_allocbt_init_key_from_rec()
185 key->alloc.ar_blockcount = rec->alloc.ar_blockcount; in xfs_allocbt_init_key_from_rec()
198 key->alloc.ar_blockcount = 0; in xfs_bnobt_init_high_key_from_rec()
206 key->alloc.ar_blockcount = rec->alloc.ar_blockcount; in xfs_cntbt_init_high_key_from_rec()
207 key->alloc.ar_startblock = 0; in xfs_cntbt_init_high_key_from_rec()
277 be32_to_cpu(k2->alloc.ar_blockcount); in xfs_cntbt_diff_two_keys()
282 be32_to_cpu(k2->alloc.ar_startblock); in xfs_cntbt_diff_two_keys()
407 (k1->alloc.ar_blockcount == k2->alloc.ar_blockcount && in xfs_cntbt_keys_inorder()
[all …]
/linux/net/core/
A Dpage_pool.c143 pool->alloc.cache[pool->alloc.count++] = page; in page_pool_refill_alloc_cache()
158 page = pool->alloc.cache[--pool->alloc.count]; in page_pool_refill_alloc_cache()
172 page = pool->alloc.cache[--pool->alloc.count]; in __page_pool_get_cached()
269 return pool->alloc.cache[--pool->alloc.count]; in __page_pool_alloc_pages_slow()
290 pool->alloc.cache[pool->alloc.count++] = page; in __page_pool_alloc_pages_slow()
299 page = pool->alloc.cache[--pool->alloc.count]; in __page_pool_alloc_pages_slow()
414 pool->alloc.cache[pool->alloc.count++] = page; in page_pool_recycle_in_cache()
642 while (pool->alloc.count) { in page_pool_empty_alloc_cache_once()
643 page = pool->alloc.cache[--pool->alloc.count]; in page_pool_empty_alloc_cache_once()
730 while (pool->alloc.count) { in page_pool_update_nid()
[all …]
/linux/tools/perf/util/
A Dstrbuf.c22 sb->alloc = sb->len = 0; in strbuf_init()
31 if (sb->alloc) { in strbuf_release()
39 char *res = sb->alloc ? sb->buf : NULL; in strbuf_detach()
51 if (nr < sb->alloc) in strbuf_grow()
57 if (alloc_nr(sb->alloc) > nr) in strbuf_grow()
58 nr = alloc_nr(sb->alloc); in strbuf_grow()
64 buf = realloc(sb->alloc ? sb->buf : NULL, nr * sizeof(*buf)); in strbuf_grow()
69 sb->alloc = nr; in strbuf_grow()
106 len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap); in strbuf_addv()
142 size_t oldalloc = sb->alloc; in strbuf_read()
[all …]
A Dstrbuf.h51 size_t alloc; member
65 return sb->alloc ? sb->alloc - sb->len - 1 : 0; in strbuf_avail()
71 if (!sb->alloc) { in strbuf_setlen()
76 assert(len < sb->alloc); in strbuf_setlen()
A Dhelp-unknown-cmd.c37 if (nr > cmds->alloc) { in add_cmd_list()
39 if (alloc_nr(cmds->alloc) < nr) in add_cmd_list()
40 cmds->alloc = nr; in add_cmd_list()
42 cmds->alloc = alloc_nr(cmds->alloc); in add_cmd_list()
43 tmp = realloc(cmds->names, cmds->alloc * sizeof(*cmds->names)); in add_cmd_list()
/linux/lib/zstd/compress/
A Dzstd_cwksp.h232 void* alloc; in ZSTD_cwksp_reserve_internal() local
244 assert(alloc >= bottom); in ZSTD_cwksp_reserve_internal()
245 if (alloc < bottom) { in ZSTD_cwksp_reserve_internal()
250 if (alloc < ws->tableValidEnd) { in ZSTD_cwksp_reserve_internal()
251 ws->tableValidEnd = alloc; in ZSTD_cwksp_reserve_internal()
253 ws->allocStart = alloc; in ZSTD_cwksp_reserve_internal()
256 return alloc; in ZSTD_cwksp_reserve_internal()
281 void* alloc = ws->tableEnd; in ZSTD_cwksp_reserve_table() local
299 return alloc; in ZSTD_cwksp_reserve_table()
307 void* alloc = ws->objectEnd; in ZSTD_cwksp_reserve_object() local
[all …]
/linux/tools/lib/subcmd/
A Dsubcmd-util.h39 #define ALLOC_GROW(x, nr, alloc) \ argument
41 if ((nr) > alloc) { \
42 if (alloc_nr(alloc) < (nr)) \
43 alloc = (nr); \
45 alloc = alloc_nr(alloc); \
46 x = xrealloc((x), alloc * sizeof(*(x))); \
/linux/arch/s390/mm/
A Dpgalloc.c381 unsigned long end, int alloc) in base_page_walk() argument
385 if (!alloc) in base_page_walk()
397 unsigned long end, int alloc) in base_segment_walk() argument
407 if (!alloc) in base_segment_walk()
418 if (!alloc) in base_segment_walk()
436 if (!alloc) in base_region3_walk()
447 if (!alloc) in base_region3_walk()
464 if (!alloc) in base_region2_walk()
475 if (!alloc) in base_region2_walk()
492 if (!alloc) in base_region1_walk()
[all …]
/linux/arch/xtensa/variants/csp/include/variant/
A Dtie-asm.h76 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
84 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\alloc)) == 0
96 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
116 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
142 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
150 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\alloc)) == 0
162 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
182 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
/linux/arch/xtensa/variants/dc233c/include/variant/
A Dtie-asm.h77 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
85 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\alloc)) == 0
97 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
115 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
141 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
149 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_GLOB) & ~(\alloc)) == 0
161 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
179 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
/linux/fs/nfs/
A Dnfs3acl.c261 struct posix_acl *orig = acl, *dfacl = NULL, *alloc; in nfs3_set_acl() local
267 alloc = get_acl(inode, ACL_TYPE_DEFAULT); in nfs3_set_acl()
268 if (IS_ERR(alloc)) in nfs3_set_acl()
270 dfacl = alloc; in nfs3_set_acl()
274 alloc = get_acl(inode, ACL_TYPE_ACCESS); in nfs3_set_acl()
275 if (IS_ERR(alloc)) in nfs3_set_acl()
278 acl = alloc; in nfs3_set_acl()
284 alloc = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfs3_set_acl()
285 if (IS_ERR(alloc)) in nfs3_set_acl()
287 acl = alloc; in nfs3_set_acl()
[all …]
/linux/drivers/char/agp/
A Dcompat_ioctl.c155 struct agp_allocate32 alloc; in compat_agpioc_allocate_wrap() local
158 if (copy_from_user(&alloc, arg, sizeof(alloc))) in compat_agpioc_allocate_wrap()
161 memory = agp_allocate_memory_wrap(alloc.pg_count, alloc.type); in compat_agpioc_allocate_wrap()
166 alloc.key = memory->key; in compat_agpioc_allocate_wrap()
167 alloc.physical = memory->physical; in compat_agpioc_allocate_wrap()
169 if (copy_to_user(arg, &alloc, sizeof(alloc))) { in compat_agpioc_allocate_wrap()
/linux/mm/
A Dmempool.c83 if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) { in poison_element()
85 } else if (pool->alloc == mempool_alloc_pages) { in poison_element()
105 if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) in kasan_poison_element()
107 else if (pool->alloc == mempool_alloc_pages) in kasan_poison_element()
114 if (pool->alloc == mempool_alloc_slab || pool->alloc == mempool_kmalloc) in kasan_unpoison_element()
116 else if (pool->alloc == mempool_alloc_pages) in kasan_unpoison_element()
186 pool->alloc = alloc_fn; in mempool_init_node()
201 element = pool->alloc(gfp_mask, pool->pool_data); in mempool_init_node()
341 element = pool->alloc(GFP_KERNEL, pool->pool_data); in mempool_resize()
392 element = pool->alloc(gfp_temp, pool->pool_data); in mempool_alloc()
/linux/scripts/coccinelle/api/
A Dkfree_mismatch.cocci17 @alloc@
64 position a != alloc.kok;
78 position a != alloc.kok;
93 position a != alloc.vok;
106 position a != alloc.vok;
141 expression alloc.E;
150 expression alloc.E;
213 ka << alloc.kok;
214 va << alloc.vok;
222 ka << alloc.kok;
[all …]
/linux/arch/xtensa/variants/de212/include/variant/
A Dtie-asm.h76 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
86 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
104 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
130 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
140 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_CC | XTHAL_SAS_CALR) & ~(\alloc)) == 0
158 .elseif ((XTHAL_SAS_OPT | XTHAL_SAS_NOCC | XTHAL_SAS_CALR) & ~(\alloc)) == 0

Completed in 56 milliseconds

12345678910>>...101