Home
last modified time | relevance | path

Searched refs:alloc_size (Results 1 – 25 of 171) sorted by relevance

1234567

/linux-6.15/tools/testing/selftests/mm/
H A Dmlock-random-test.c141 if (cur.rlim_cur < alloc_size) in test_mlock_within_limit()
143 alloc_size, (unsigned int)cur.rlim_cur); in test_mlock_within_limit()
154 int lock_size = rand() % alloc_size; in test_mlock_within_limit()
155 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_within_limit()
166 strerror(errno), p, alloc_size, in test_mlock_within_limit()
178 __func__, locked_vm_size, alloc_size); in test_mlock_within_limit()
207 if (cur.rlim_cur >= alloc_size) in test_mlock_outof_limit()
209 alloc_size, (unsigned int)cur.rlim_cur); in test_mlock_outof_limit()
215 int lock_size = (rand() % (alloc_size - cur.rlim_cur)) in test_mlock_outof_limit()
217 int start_offset = rand() % (alloc_size - lock_size); in test_mlock_outof_limit()
[all …]
H A Ddroppable.c20 size_t alloc_size = 134217728; in main() local
28 alloc = mmap(0, alloc_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_DROPPABLE, -1, 0); in main()
30 memset(alloc, 'A', alloc_size); in main()
31 for (size_t i = 0; i < alloc_size; i += page_size) in main()
42 for (size_t i = 0; i < alloc_size; i += page_size) { in main()
/linux-6.15/drivers/firmware/efi/libstub/
H A Dzboot.c10 static unsigned long alloc_preferred_address(unsigned long alloc_size) in alloc_preferred_address() argument
16 alloc_size / EFI_PAGE_SIZE, &efi_addr) == EFI_SUCCESS) in alloc_preferred_address()
23 unsigned long alloc_size) in efi_cache_sync_image() argument
38 unsigned long image_base, alloc_size; in efi_zboot_entry() local
57 status = efi_zboot_decompress_init(&alloc_size); in efi_zboot_entry()
63 image_base = alloc_preferred_address(alloc_size); in efi_zboot_entry()
86 status = efi_random_alloc(alloc_size, min_kimg_align, &image_base, in efi_zboot_entry()
95 status = efi_zboot_decompress((void *)image_base, alloc_size) ?: in efi_zboot_entry()
98 efi_free(alloc_size, image_base); in efi_zboot_entry()
H A Dfile.c206 unsigned long alloc_size; in handle_cmdline_files() local
220 alloc_addr = alloc_size = 0; in handle_cmdline_files()
264 if (round_up(alloc_size + size, EFI_ALLOC_ALIGN) > in handle_cmdline_files()
265 round_up(alloc_size, EFI_ALLOC_ALIGN)) { in handle_cmdline_files()
270 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files()
274 status = efi_allocate_pages(alloc_size + size, in handle_cmdline_files()
290 efi_free(alloc_size, old_addr); in handle_cmdline_files()
294 addr = (void *)alloc_addr + alloc_size; in handle_cmdline_files()
295 alloc_size += size; in handle_cmdline_files()
316 *load_size = alloc_size; in handle_cmdline_files()
[all …]
H A Drelocate.c113 unsigned long alloc_size, in efi_relocate_kernel() argument
124 if (!image_addr || !image_size || !alloc_size) in efi_relocate_kernel()
126 if (alloc_size < image_size) in efi_relocate_kernel()
139 nr_pages = round_up(alloc_size, EFI_ALLOC_ALIGN) / EFI_PAGE_SIZE; in efi_relocate_kernel()
148 status = efi_low_alloc_above(alloc_size, alignment, &new_addr, in efi_relocate_kernel()
H A Darm32-stub.c87 int alloc_size = MAX_UNCOMP_KERNEL_SIZE + EFI_PHYS_ALIGN; in handle_kernel_image() local
97 status = efi_low_alloc_above(alloc_size, EFI_PAGE_SIZE, &alloc_base, 0x0); in handle_kernel_image()
122 alloc_size -= *reserve_addr - alloc_base; in handle_kernel_image()
125 (alloc_size - MAX_UNCOMP_KERNEL_SIZE) / EFI_PAGE_SIZE); in handle_kernel_image()
H A Dzboot-decompress-zstd.c17 efi_status_t efi_zboot_decompress_init(unsigned long *alloc_size) in efi_zboot_decompress_init() argument
26 *alloc_size = payload_size; in efi_zboot_decompress_init()
H A Dzboot-decompress-gzip.c19 efi_status_t efi_zboot_decompress_init(unsigned long *alloc_size) in efi_zboot_decompress_init() argument
41 *alloc_size = payload_size; in efi_zboot_decompress_init()
/linux-6.15/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum1_kvdl.c35 unsigned int alloc_size; member
49 .alloc_size = MLXSW_SP1_KVDL_##id##_ALLOC_SIZE, \
72 unsigned int alloc_size) in mlxsw_sp1_kvdl_alloc_size_part() argument
79 if (alloc_size <= part->info.alloc_size && in mlxsw_sp1_kvdl_alloc_size_part()
81 part->info.alloc_size <= min_part->info.alloc_size)) in mlxsw_sp1_kvdl_alloc_size_part()
108 return info->start_index + entry_index * info->alloc_size; in mlxsw_sp1_kvdl_to_kvdl_index()
125 info->alloc_size; in mlxsw_sp1_kvdl_part_alloc()
190 *p_alloc_size = part->info.alloc_size; in mlxsw_sp1_kvdl_alloc_size_query()
226 nr_entries = div_u64(resource_size, info->alloc_size); in mlxsw_sp1_kvdl_part_init()
286 info->alloc_size; in mlxsw_sp1_kvdl_part_occ()
[all …]
/linux-6.15/tools/testing/selftests/powerpc/stringloops/
H A Dmemcmp.c76 unsigned long i, comp_size, alloc_size; in testcase() local
81 alloc_size = comp_size + MAX_OFFSET_DIFF_S1_S2; in testcase()
89 s1 = p + MAP_SIZE - alloc_size; in testcase()
90 s2 = p + 3 * MAP_SIZE - alloc_size; in testcase()
104 for (j = 0; j < alloc_size; j++) in testcase()
130 for (j = 0; j < alloc_size; j++) in testcase()
/linux-6.15/kernel/dma/
H A Dswiotlb.c77 size_t alloc_size; member
292 mem->slots[i].alloc_size = 0; in swiotlb_init_io_tlb_pool()
360 size_t alloc_size; in swiotlb_init_remap() local
864 size_t alloc_size = mem->slots[index].alloc_size; in swiotlb_bounce() local
886 alloc_size -= tlb_offset; in swiotlb_bounce()
888 if (size > alloc_size) { in swiotlb_bounce()
891 alloc_size, size); in swiotlb_bounce()
892 size = alloc_size; in swiotlb_bounce()
1104 pool->slots[i].alloc_size = alloc_size - (offset + in swiotlb_search_pool_area()
1156 orig_addr, alloc_size, in swiotlb_search_area()
[all …]
/linux-6.15/lib/tests/
H A Dfortify_kunit.c227 kmalloc_node(alloc_size, gfp, NUMA_NO_NODE), \
232 kzalloc_node(alloc_size, gfp, NUMA_NO_NODE), \
255 orig = kmalloc(alloc_size, gfp); \
258 krealloc(orig, (alloc_size) * 2, gfp), \
260 orig = kmalloc(alloc_size, gfp); \
265 orig = kmalloc(alloc_size, gfp); \
348 devm_kmalloc_array(dev, 1, alloc_size, gfp), \
351 devm_kmalloc_array(dev, alloc_size, 1, gfp), \
354 devm_kcalloc(dev, 1, alloc_size, gfp), \
357 devm_kcalloc(dev, alloc_size, 1, gfp), \
[all …]
/linux-6.15/lib/
H A Dscatterlist.c217 if (alloc_size > curr_max_ents) { in __sg_free_table()
219 alloc_size = curr_max_ents; in __sg_free_table()
220 sg_size = alloc_size - 1; in __sg_free_table()
222 sg_size = alloc_size; in __sg_free_table()
230 free_fn(sgl, alloc_size); in __sg_free_table()
311 alloc_size = curr_max_ents; in __sg_alloc_table()
312 sg_size = alloc_size - 1; in __sg_alloc_table()
314 sg_size = alloc_size; in __sg_alloc_table()
337 sg_init_table(sg, alloc_size); in __sg_alloc_table()
393 unsigned int alloc_size; in get_next_sg() local
[all …]
/linux-6.15/fs/ocfs2/
H A Dmove_extents.c734 if ((*alloc_size + *len_defraged) < threshold) { in ocfs2_calc_extent_defrag_len()
738 *len_defraged += *alloc_size; in ocfs2_calc_extent_defrag_len()
753 *alloc_size = threshold - *len_defraged; in ocfs2_calc_extent_defrag_len()
826 if (alloc_size > len_to_move) in __ocfs2_move_extents_range()
827 alloc_size = len_to_move; in __ocfs2_move_extents_range()
858 &alloc_size, flags); in __ocfs2_move_extents_range()
861 &new_phys_cpos, alloc_size, in __ocfs2_move_extents_range()
864 new_phys_cpos += alloc_size; in __ocfs2_move_extents_range()
872 context->clusters_moved += alloc_size; in __ocfs2_move_extents_range()
874 cpos += alloc_size; in __ocfs2_move_extents_range()
[all …]
/linux-6.15/tools/testing/selftests/rseq/
H A Drseq.c122 unsigned int alloc_size = rseq_size; in get_rseq_min_alloc_size() local
124 if (alloc_size < ORIG_RSEQ_ALLOC_SIZE) in get_rseq_min_alloc_size()
125 alloc_size = ORIG_RSEQ_ALLOC_SIZE; in get_rseq_min_alloc_size()
126 return alloc_size; in get_rseq_min_alloc_size()
/linux-6.15/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/
H A Dpool.c282 u32 alloc_size, int idx) in hws_pool_create_resource_on_index() argument
284 int ret = hws_pool_resource_alloc(pool, alloc_size, idx); in hws_pool_create_resource_on_index()
288 pool->type, alloc_size, idx); in hws_pool_create_resource_on_index()
299 u32 alloc_size; in hws_pool_element_create_new_elem() local
301 alloc_size = pool->alloc_log_sz; in hws_pool_element_create_new_elem()
311 elem->bitmap = hws_pool_create_and_init_bitmap(alloc_size - order); in hws_pool_element_create_new_elem()
315 pool->type, alloc_size, idx); in hws_pool_element_create_new_elem()
319 elem->log_size = alloc_size - order; in hws_pool_element_create_new_elem()
322 if (hws_pool_create_resource_on_index(pool, alloc_size, idx)) { in hws_pool_element_create_new_elem()
324 pool->type, alloc_size, idx); in hws_pool_element_create_new_elem()
/linux-6.15/mm/kasan/
H A Dreport.c307 } else if (access_addr >= object_addr + info->alloc_size) { in describe_object_addr()
309 rel_bytes = access_addr - (object_addr + info->alloc_size); in describe_object_addr()
331 rel_bytes, rel_type, region_state, info->alloc_size, in describe_object_addr()
332 (void *)object_addr, (void *)(object_addr + info->alloc_size)); in describe_object_addr()
545 info->alloc_size = kasan_get_alloc_size(info->object, info->cache); in complete_report_info()
547 if (!info->alloc_size) in complete_report_info()
548 info->alloc_size = info->cache->object_size; in complete_report_info()
/linux-6.15/mm/
H A Dpercpu.c1351 size_t alloc_size; in pcpu_alloc_first_chunk() local
1376 alloc_size = in pcpu_alloc_first_chunk()
2461 upa = ai->alloc_size / ai->unit_size; in pcpu_dump_alloc_info()
2559 size_t alloc_size; in pcpu_setup_first_chunk() local
2825 upa = alloc_size / min_unit_size; in pcpu_build_alloc_info()
2826 while (alloc_size % upa || (offset_in_page(alloc_size / upa))) in pcpu_build_alloc_info()
2862 if (alloc_size % upa || (offset_in_page(alloc_size / upa))) in pcpu_build_alloc_info()
2905 ai->unit_size = alloc_size / upa; in pcpu_build_alloc_info()
2907 ai->alloc_size = alloc_size; in pcpu_build_alloc_info()
3195 upa = ai->alloc_size/ai->unit_size; in pcpu_page_first_chunk()
[all …]
/linux-6.15/fs/ntfs3/
H A Dattrib.c1885 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_collapse_range()
1892 total_size = alloc_size; in attr_collapse_range()
2087 attr_b->nres.alloc_size = cpu_to_le64(alloc_size - bytes); in attr_collapse_range()
2153 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_punch_hole()
2156 if (vbo >= alloc_size) { in attr_punch_hole()
2164 if (bytes > alloc_size) in attr_punch_hole()
2165 bytes = alloc_size; in attr_punch_hole()
2361 alloc_size = data_size; in attr_insert_range()
2365 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_insert_range()
2423 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_insert_range()
[all …]
/linux-6.15/arch/arm64/mm/
H A Dgcs.c73 unsigned long alloc_size; in SYSCALL_DEFINE3() local
96 alloc_size = PAGE_ALIGN(size); in SYSCALL_DEFINE3()
97 if (alloc_size < size) in SYSCALL_DEFINE3()
100 addr = alloc_gcs(addr, alloc_size); in SYSCALL_DEFINE3()
/linux-6.15/drivers/md/
H A Ddm-stats.c88 a = shared_memory_amount + alloc_size; in __check_shared_memory()
100 static bool check_shared_memory(size_t alloc_size) in check_shared_memory() argument
106 ret = __check_shared_memory(alloc_size); in check_shared_memory()
113 static bool claim_shared_memory(size_t alloc_size) in claim_shared_memory() argument
117 if (!__check_shared_memory(alloc_size)) { in claim_shared_memory()
122 shared_memory_amount += alloc_size; in claim_shared_memory()
129 static void free_shared_memory(size_t alloc_size) in free_shared_memory() argument
141 shared_memory_amount -= alloc_size; in free_shared_memory()
150 if (!claim_shared_memory(alloc_size)) in dm_kvzalloc()
157 free_shared_memory(alloc_size); in dm_kvzalloc()
[all …]
/linux-6.15/sound/soc/sof/
H A Dsof-client-ipc-msg-injector.c259 size_t alloc_size; in sof_msg_inject_probe() local
268 alloc_size = priv->max_msg_size; in sof_msg_inject_probe()
271 alloc_size += sizeof(struct sof_ipc4_msg); in sof_msg_inject_probe()
273 priv->tx_buffer = devm_kmalloc(dev, alloc_size, GFP_KERNEL); in sof_msg_inject_probe()
274 priv->rx_buffer = devm_kzalloc(dev, alloc_size, GFP_KERNEL); in sof_msg_inject_probe()
H A Dsof-client-ipc-kernel-injector.c98 size_t alloc_size; in sof_msg_inject_probe() local
106 alloc_size = priv->max_msg_size; in sof_msg_inject_probe()
107 priv->kernel_buffer = devm_kmalloc(dev, alloc_size, GFP_KERNEL); in sof_msg_inject_probe()
/linux-6.15/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_simple_resource.c147 size_t alloc_size; in vmw_simple_resource_create_ioctl() local
150 alloc_size = offsetof(struct vmw_user_simple_resource, simple) + in vmw_simple_resource_create_ioctl()
153 usimple = kzalloc(alloc_size, GFP_KERNEL); in vmw_simple_resource_create_ioctl()
/linux-6.15/net/openvswitch/
H A Dvport.c126 size_t alloc_size; in ovs_vport_alloc() local
129 alloc_size = sizeof(struct vport); in ovs_vport_alloc()
131 alloc_size = ALIGN(alloc_size, VPORT_ALIGN); in ovs_vport_alloc()
132 alloc_size += priv_size; in ovs_vport_alloc()
135 vport = kzalloc(alloc_size, GFP_KERNEL); in ovs_vport_alloc()

1234567