Home
last modified time | relevance | path

Searched refs:new_sz (Results 1 – 11 of 11) sorted by relevance

/linux/tools/perf/util/
H A Dutil.c492 size_t new_sz = *arr_sz; in do_realloc_array_as_needed()
496 if (!new_sz) in do_realloc_array_as_needed()
497 new_sz = msz >= 64 ? 1 : roundup(64, msz); /* Start with at least 64 bytes */ in do_realloc_array_as_needed()
498 while (x >= new_sz) { in do_realloc_array_as_needed()
499 if (check_mul_overflow(new_sz, (size_t)2, &new_sz)) in do_realloc_array_as_needed()
502 if (new_sz == *arr_sz) in do_realloc_array_as_needed()
504 new_arr = calloc(new_sz, msz); in do_realloc_array_as_needed()
510 for (i = *arr_sz; i < new_sz; i++) in do_realloc_array_as_needed()
514 *arr_sz = new_sz; in do_realloc_array_as_needed()
490 size_t new_sz = *arr_sz; do_realloc_array_as_needed() local
[all...]
H A Dthread-stack.c121 size_t sz, new_sz; in thread_stack__grow() local
123 new_sz = ts->sz + STACK_GROWTH; in thread_stack__grow()
124 sz = new_sz * sizeof(struct thread_stack_entry); in thread_stack__grow()
131 ts->sz = new_sz; in thread_stack__grow()
180 unsigned int new_sz = 1; in thread_stack__new() local
183 new_sz = roundup_pow_of_two(cpu + 1); in thread_stack__new()
185 if (!ts || new_sz > old_sz) { in thread_stack__new()
186 new_ts = calloc(new_sz, sizeof(*ts)); in thread_stack__new()
191 new_ts->arr_sz = new_sz; in thread_stack__new()
/linux/net/core/
H A Dnetprio_cgroup.c44 size_t new_sz, new_len; in extend_netdev_table() local
56 new_sz = PRIOMAP_MIN_SZ; in extend_netdev_table()
58 new_len = (new_sz - offsetof(struct netprio_map, priomap)) / in extend_netdev_table()
62 new_sz *= 2; in extend_netdev_table()
64 if (WARN_ON(new_sz < PRIOMAP_MIN_SZ)) in extend_netdev_table()
69 new = kzalloc(new_sz, GFP_KERNEL); in extend_netdev_table()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dglobal_map_resize.c25 size_t array_len, actual_sz, new_sz; in global_map_resize_bss_subtest() local
46 new_sz = sizeof(skel->data_percpu_arr->percpu_arr[0]) * libbpf_num_possible_cpus(); in global_map_resize_bss_subtest()
47 err = bpf_map__set_value_size(skel->maps.data_percpu_arr, new_sz); in global_map_resize_bss_subtest()
98 size_t array_len, actual_sz, new_sz; in global_map_resize_data_subtest() local
119 new_sz = sizeof(skel->data_percpu_arr->percpu_arr[0]) * libbpf_num_possible_cpus(); in global_map_resize_data_subtest()
120 err = bpf_map__set_value_size(skel->maps.data_percpu_arr, new_sz); in global_map_resize_data_subtest()
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dmod_hdr.c164 size_t new_sz, old_sz; in mlx5e_mod_hdr_alloc() local
177 new_sz = MLX5_MH_ACT_SZ * new_num_actions; in mlx5e_mod_hdr_alloc()
181 ret = kzalloc(new_sz, GFP_KERNEL); in mlx5e_mod_hdr_alloc()
187 ret = krealloc(mod_hdr_acts->actions, new_sz, GFP_KERNEL); in mlx5e_mod_hdr_alloc()
189 memset(ret + old_sz, 0, new_sz - old_sz); in mlx5e_mod_hdr_alloc()
/linux/tools/lib/bpf/
H A Drelo_core.h67 __u32 new_sz; member
H A Drelo_core.c910 res->orig_sz = res->new_sz = 0; in bpf_core_calc_relo()
918 &res->new_val, &res->new_sz, in bpf_core_calc_relo()
927 if (res->orig_sz != res->new_sz) { in bpf_core_calc_relo()
1109 if (res->new_sz != res->orig_sz) { in bpf_core_patch_insn()
1119 insn_bpf_sz = insn_bytes_to_bpf_size(res->new_sz); in bpf_core_patch_insn()
1122 prog_name, relo_idx, insn_idx, res->new_sz); in bpf_core_patch_insn()
1128 prog_name, relo_idx, insn_idx, res->orig_sz, res->new_sz); in bpf_core_patch_insn()
H A Dlibbpf.c1853 static int bpf_map_mmap_resize(struct bpf_map *map, size_t old_sz, size_t new_sz) in bpf_map_mmap_resize() argument
1860 if (old_sz == new_sz) in bpf_map_mmap_resize()
1863 mmaped = mmap(NULL, new_sz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); in bpf_map_mmap_resize()
1867 memcpy(mmaped, map->mmaped, min(old_sz, new_sz)); in bpf_map_mmap_resize()
6582 size_t old_sz, new_sz; in adjust_prog_btf_ext_info() local
6612 new_sz = old_sz + (copy_end - copy_start); in adjust_prog_btf_ext_info()
6613 new_prog_info = realloc(*prog_info, new_sz); in adjust_prog_btf_ext_info()
6617 *prog_rec_cnt = new_sz / ext_info->rec_size; in adjust_prog_btf_ext_info()
6628 rec_end = new_prog_info + new_sz; in adjust_prog_btf_ext_info()
7599 int i, j, nrels, new_sz; in bpf_object__collect_map_relos() local
[all …]
/linux/fs/ntfs3/
H A Dxattr.c335 u64 new_sz; in ntfs_set_ea() local
464 new_sz = size; in ntfs_set_ea()
465 err = attr_set_size(ni, ATTR_EA, NULL, 0, &ea_run, new_sz, &new_sz, in ntfs_set_ea()
H A Dfslog.c3137 struct NEW_ATTRIBUTE_SIZES *new_sz; in do_action() local
3453 new_sz = data; in do_action()
3457 attr->nres.alloc_size = new_sz->alloc_size; in do_action()
3458 attr->nres.data_size = new_sz->data_size; in do_action()
3459 attr->nres.valid_size = new_sz->valid_size; in do_action()
3462 attr->nres.total_size = new_sz->total_size; in do_action()
/linux/kernel/bpf/
H A Dstates.c122 u64 new_sz; in scc_visit_alloc() local
127 new_sz = sizeof(*info) + sizeof(struct bpf_scc_visit) * (num_visits + 1); in scc_visit_alloc()
128 info = kvrealloc(env->scc_info[scc], new_sz, GFP_KERNEL_ACCOUNT); in scc_visit_alloc()