Home
last modified time | relevance | path

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

123456

/netbsd/src/external/lgpl3/gmp/dist/mpf/
Dinp_str.c40 size_t alloc_size, str_size; in mpf_inp_str() local
48 alloc_size = 100; in mpf_inp_str()
49 str = __GMP_ALLOCATE_FUNC_TYPE (alloc_size, char); in mpf_inp_str()
63 if (str_size >= alloc_size) in mpf_inp_str()
65 size_t old_alloc_size = alloc_size; in mpf_inp_str()
66 alloc_size = alloc_size * 3 / 2; in mpf_inp_str()
67 str = __GMP_REALLOCATE_FUNC_TYPE (str, old_alloc_size, alloc_size, char); in mpf_inp_str()
77 if (str_size >= alloc_size) in mpf_inp_str()
79 size_t old_alloc_size = alloc_size; in mpf_inp_str()
80 alloc_size = alloc_size * 3 / 2; in mpf_inp_str()
[all …]
Dget_str.c133 size_t alloc_size = 0; in mpf_get_str() local
168 alloc_size = n_digits + 2; in mpf_get_str()
314 if (alloc_size != 0) in mpf_get_str()
316 __GMP_REALLOCATE_FUNC_MAYBE_TYPE (dbuf, alloc_size, n_digits + 1, char); in mpf_get_str()
/netbsd/src/external/lgpl3/mpfr/dist/src/
Dinp_str.c35 size_t alloc_size, str_size; in mpfr_inp_str() local
40 alloc_size = 100; in mpfr_inp_str()
41 str = (unsigned char *) mpfr_allocate_func (alloc_size); in mpfr_inp_str()
58 if (str_size >= alloc_size) in mpfr_inp_str()
60 size_t old_alloc_size = alloc_size; in mpfr_inp_str()
61 alloc_size = alloc_size / 2 * 3; in mpfr_inp_str()
63 if (MPFR_UNLIKELY (alloc_size <= old_alloc_size)) in mpfr_inp_str()
64 alloc_size = (size_t) -1; in mpfr_inp_str()
65 MPFR_ASSERTD (str_size < alloc_size); in mpfr_inp_str()
67 mpfr_reallocate_func (str, old_alloc_size, alloc_size); in mpfr_inp_str()
[all …]
Dmpfr-gmp.c308 mpfr_allocate_func (size_t alloc_size) in mpfr_allocate_func() argument
315 return (*allocate_func) (alloc_size); in mpfr_allocate_func()
/netbsd/src/external/lgpl3/gmp/dist/mpz/
Dinp_str.c71 size_t alloc_size, str_size; in mpz_inp_str_nowhite() local
133 alloc_size = 100; in mpz_inp_str_nowhite()
134 str = __GMP_ALLOCATE_FUNC_TYPE (alloc_size, char); in mpz_inp_str_nowhite()
143 if (str_size >= alloc_size) in mpz_inp_str_nowhite()
145 size_t old_alloc_size = alloc_size; in mpz_inp_str_nowhite()
146 alloc_size = alloc_size * 3 / 2; in mpz_inp_str_nowhite()
147 str = __GMP_REALLOCATE_FUNC_TYPE (str, old_alloc_size, alloc_size, char); in mpz_inp_str_nowhite()
171 (*__gmp_free_func) (str, alloc_size); in mpz_inp_str_nowhite()
Dget_str.c47 size_t alloc_size = 0; in mpz_get_str() local
75 MPN_SIZEINBASE (alloc_size, PTR(x), ABS(x_size), base); in mpz_get_str()
76 alloc_size += 1 + (x_size<0); in mpz_get_str()
77 res_str = __GMP_ALLOCATE_FUNC_TYPE (alloc_size, char); in mpz_get_str()
97 ASSERT (alloc_size == 0 || str_size <= alloc_size - (SIZ(x) < 0)); in mpz_get_str()
107 if (alloc_size != 0) in mpz_get_str()
111 __GMP_REALLOCATE_FUNC_MAYBE_TYPE (return_str, alloc_size, actual_size, in mpz_get_str()
/netbsd/src/external/gpl3/binutils/dist/libiberty/
Dxmemdup.c35 xmemdup (const void *input, size_t copy_size, size_t alloc_size) in xmemdup() argument
37 void *output = xmalloc (alloc_size); in xmemdup()
38 if (alloc_size > copy_size) in xmemdup()
39 memset ((char *) output + copy_size, 0, alloc_size - copy_size); in xmemdup()
/netbsd/src/external/gpl3/gdb/dist/libiberty/
Dxmemdup.c35 xmemdup (const void *input, size_t copy_size, size_t alloc_size) in xmemdup() argument
37 void *output = xmalloc (alloc_size); in xmemdup()
38 if (alloc_size > copy_size) in xmemdup()
39 memset ((char *) output + copy_size, 0, alloc_size - copy_size); in xmemdup()
/netbsd/src/external/gpl3/gcc/dist/libiberty/
Dxmemdup.c35 xmemdup (const PTR input, size_t copy_size, size_t alloc_size) in xmemdup() argument
37 PTR output = xmalloc (alloc_size); in xmemdup()
38 if (alloc_size > copy_size) in xmemdup()
39 memset ((char *) output + copy_size, 0, alloc_size - copy_size); in xmemdup()
/netbsd/src/usr.sbin/acpitools/aml/
Daml_memman.c74 size_t alloc_size; in manage_block() local
81 alloc_size = MEMMAN_BLOCKNODE_SIZE(entries); in manage_block()
85 realblock = (char *)block + alloc_size; in manage_block()
87 tmp = MEMMAN_SYSMALLOC(alloc_size); in manage_block()
93 memman->allocated_mem += alloc_size; in manage_block()
105 alloc_size += roundup(bmp->size * entries, ROUNDUP_UNIT); in manage_block()
107 memblock->allocated_mem = alloc_size; in manage_block()
139 size_t alloc_size; in memman_alloc() local
157 alloc_size = roundup(bmp->size * MEMMAN_INCR_SIZE, in memman_alloc()
159 block = MEMMAN_SYSMALLOC(alloc_size); in memman_alloc()
[all …]
/netbsd/src/external/gpl3/gdb/dist/gdb/testsuite/lib/
Dprecise-aligned-alloc.c48 size_t alloc_size = size + alignment; in precise_aligned_alloc() local
51 void *p = aligned_alloc (alignment * 2, alloc_size); in precise_aligned_alloc()
54 void *p_end = p + alloc_size; in precise_aligned_alloc()
/netbsd/src/sys/kern/
Dsys_generic.c519 size_t size, alloc_size; in sys_ioctl() local
531 alloc_size = 0; in sys_ioctl()
556 alloc_size = size; in sys_ioctl()
601 alloc_size = IOCPARM_LEN(DIOCGDINFO); in sys_ioctl()
617 if (alloc_size > sizeof(stkbuf)) { in sys_ioctl()
618 memp = kmem_alloc(alloc_size, KM_SLEEP); in sys_ioctl()
634 if (__predict_false(size < alloc_size)) { in sys_ioctl()
636 alloc_size - size); in sys_ioctl()
690 kmem_free(memp, alloc_size); in sys_ioctl()
/netbsd/src/sys/external/bsd/drm2/dist/drm/vmwgfx/
Dvmwgfx_simple_resource.c161 size_t alloc_size; in vmw_simple_resource_create_ioctl() local
165 alloc_size = offsetof(struct vmw_user_simple_resource, simple) + in vmw_simple_resource_create_ioctl()
167 account_size = ttm_round_pot(alloc_size) + VMW_IDA_ACC_SIZE + in vmw_simple_resource_create_ioctl()
185 usimple = kzalloc(alloc_size, GFP_KERNEL); in vmw_simple_resource_create_ioctl()
Dvmwgfx_surface.c1992 size_t alloc_size; in vmw_surface_dirty_sync() local
2015 alloc_size = num_dirty * ((has_dx) ? sizeof(*cmd1) : sizeof(*cmd2)); in vmw_surface_dirty_sync()
2016 cmd = VMW_FIFO_RESERVE(dev_priv, alloc_size); in vmw_surface_dirty_sync()
2052 vmw_fifo_commit(dev_priv, alloc_size); in vmw_surface_dirty_sync()
2143 size_t alloc_size; in vmw_surface_clean() local
2149 alloc_size = sizeof(*cmd); in vmw_surface_clean()
2150 cmd = VMW_FIFO_RESERVE(dev_priv, alloc_size); in vmw_surface_clean()
2157 vmw_fifo_commit(dev_priv, alloc_size); in vmw_surface_clean()
/netbsd/src/external/gpl3/binutils/dist/include/
Dansidecl.h257 # define ATTRIBUTE_RESULT_SIZE_1 __attribute__ ((alloc_size (1)))
265 # define ATTRIBUTE_RESULT_SIZE_2 __attribute__ ((alloc_size (2)))
273 # define ATTRIBUTE_RESULT_SIZE_1_2 __attribute__ ((alloc_size (1, 2)))
/netbsd/src/external/gpl3/gdb/dist/include/
Dansidecl.h257 # define ATTRIBUTE_RESULT_SIZE_1 __attribute__ ((alloc_size (1)))
265 # define ATTRIBUTE_RESULT_SIZE_2 __attribute__ ((alloc_size (2)))
273 # define ATTRIBUTE_RESULT_SIZE_1_2 __attribute__ ((alloc_size (1, 2)))
/netbsd/src/external/gpl3/gdb/dist/gdb/
Dobjfiles.c1060 int alloc_size, map_size, i; in update_section_map() local
1070 alloc_size = 0; in update_section_map()
1074 alloc_size += 1; in update_section_map()
1077 if (alloc_size == 0) in update_section_map()
1084 map = XNEWVEC (struct obj_section *, alloc_size); in update_section_map()
1092 std::sort (map, map + alloc_size, sort_cmp); in update_section_map()
1093 map_size = filter_debuginfo_sections(map, alloc_size); in update_section_map()
1096 if (map_size < alloc_size) in update_section_map()
1100 gdb_assert (alloc_size == map_size); in update_section_map()
/netbsd/src/external/gpl3/gcc/dist/include/
Dansidecl.h298 # define ATTRIBUTE_RESULT_SIZE_1 __attribute__ ((alloc_size (1)))
306 # define ATTRIBUTE_RESULT_SIZE_2 __attribute__ ((alloc_size (2)))
314 # define ATTRIBUTE_RESULT_SIZE_1_2 __attribute__ ((alloc_size (1, 2)))
/netbsd/src/sys/external/bsd/drm2/dist/drm/ttm/
Dttm_page_alloc.c93 unsigned alloc_size; member
186 m->options.alloc_size = val; in ttm_pool_store()
204 val = m->options.alloc_size; in ttm_pool_show()
598 unsigned alloc_size = _manager->options.alloc_size; in ttm_page_pool_fill_locked() local
608 cstate, alloc_size, 0); in ttm_page_pool_fill_locked()
614 pool->npages += alloc_size; in ttm_page_pool_fill_locked()
1000 _manager->options.alloc_size = NUM_PAGES_TO_ALLOC; in ttm_page_alloc_init()
/netbsd/src/external/bsd/fetch/dist/libfetch/
Dcommon.c868 if (ue->length + 1 >= ue->alloc_size) {
869 tmp = realloc(ue->urls, (ue->alloc_size * 2 + 1) * sizeof(*tmp));
876 ue->alloc_size = ue->alloc_size * 2 + 1;
922 ue->length = ue->alloc_size = 0;
932 if (len > dst->alloc_size) {
941 dst->alloc_size = len;
968 ue->length = ue->alloc_size = 0;
/netbsd/src/external/gpl3/gcc/dist/gcc/
Dggc-page.cc300 size_t alloc_size; member
854 size_t alloc_size, head_slop, tail_slop; in alloc_page() local
858 alloc_size = GGC_QUIRE_SIZE * G.pagesize; in alloc_page()
860 alloc_size = entry_size + G.pagesize - 1; in alloc_page()
861 allocation = XNEWVEC (char, alloc_size); in alloc_page()
866 tail_slop = ((size_t) allocation + alloc_size) & (G.pagesize - 1); in alloc_page()
868 tail_slop = alloc_size - entry_size - head_slop; in alloc_page()
869 enda = allocation + alloc_size - tail_slop; in alloc_page()
893 group->alloc_size = alloc_size; in alloc_page()
896 G.bytes_mapped += alloc_size; in alloc_page()
[all …]
/netbsd/src/sys/arch/shark/ofw/
Dofw.c1885 vsize_t alloc_size = (size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); in ofw_claimpages() local
1890 if (alloc_size == 0) in ofw_claimpages()
1893 for (aligned_size = 1; aligned_size < alloc_size; aligned_size <<= 1) in ofw_claimpages()
1901 if (ofw_claimvirt(va, alloc_size, 0) != va) in ofw_claimpages()
1903 pa = ofw_claimphys(0, alloc_size, aligned_size); in ofw_claimpages()
1907 ofw_settranslation(va, pa, alloc_size, -1); in ofw_claimpages()
1910 memset((char *)va, 0, alloc_size); in ofw_claimpages()
1923 vsize_t alloc_size = (size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); in ofw_discardmappings() local
1924 int npages = alloc_size / PAGE_SIZE; in ofw_discardmappings()
/netbsd/src/lib/libc/stdlib/
Djemalloc.c852 size_t alloc_size);
2270 arena_palloc(arena_t *arena, size_t alignment, size_t size, size_t alloc_size) in arena_palloc() argument
2283 ret = (void *)arena_run_alloc(arena, alloc_size); in arena_palloc()
2293 assert(offset < alloc_size); in arena_palloc()
2306 (unsigned)((alloc_size - size) >> pagesize_2pow)); in arena_palloc()
2326 trailsize = alloc_size - leadsize - size; in arena_palloc()
2329 assert(trailsize < alloc_size); in arena_palloc()
2692 size_t alloc_size, chunk_size, offset; in huge_palloc() local
2708 alloc_size = chunk_size + alignment - chunksize; in huge_palloc()
2710 alloc_size = (alignment << 1) - chunksize; in huge_palloc()
[all …]
/netbsd/src/sys/arch/amd64/amd64/
Dnetbsd32_machdep.c625 const size_t alloc_size = sizeof(*descv) * ua.num; in x86_64_set_ldt32() local
627 descv = kmem_alloc(alloc_size, KM_SLEEP); in x86_64_set_ldt32()
634 kmem_free(descv, alloc_size); in x86_64_set_ldt32()
655 const size_t alloc_size = ua.num * sizeof(union descriptor); in x86_64_get_ldt32() local
657 cp = kmem_alloc(alloc_size, KM_SLEEP); in x86_64_get_ldt32()
664 kmem_free(cp, alloc_size); in x86_64_get_ldt32()
/netbsd/src/external/public-domain/xz/dist/tests/
Dtest_index.c214 const size_t alloc_size = 128 * 1024; in test_code() local
215 uint8_t *buf = malloc(alloc_size); in test_code()
595 const size_t alloc_size = 128 * 1024; in test_corrupt() local
596 uint8_t *buf = malloc(alloc_size); in test_corrupt()

123456