Searched refs:alloc_size (Results 1 - 25 of 28) sorted by relevance

12

/haiku-buildtools/gcc/gcc/testsuite/gcc.dg/
H A Dattr-alloc_size-2.c3 char *foo() __attribute__((alloc_size(1))); /* { dg-warning "outside range" } */
H A Dattr-alloc_size.c8 extern char *mallocminus1(int size) __attribute__((alloc_size(-1))); /* { dg-warning "parameter outside range" } */
9 extern char *malloc0(int size) __attribute__((alloc_size(0))); /* { dg-warning "parameter outside range" } */
10 extern char *malloc1(int size) __attribute__((alloc_size(1)));
11 extern char *malloc2(int empty, int size) __attribute__((alloc_size(2)));
12 extern char *calloc1(int size, int elements) __attribute__((alloc_size(1,2)));
13 extern char *calloc2(int size, int empty, int elements) __attribute__((alloc_size(1,3)));
14 extern char *balloc1(void *size) __attribute__((alloc_size(1)));
/haiku-buildtools/gcc/mpfr/src/
H A Dinp_str.c35 size_t alloc_size, str_size; local
43 alloc_size = 100;
44 str = (unsigned char *) (*__gmp_allocate_func) (alloc_size);
60 if (str_size >= alloc_size)
62 size_t old_alloc_size = alloc_size;
63 alloc_size = alloc_size * 3 / 2;
65 (*__gmp_reallocate_func) (str, old_alloc_size, alloc_size);
77 then necessarily str_size >= alloc_size was checked, so
78 now str_size < alloc_size */
[all...]
/haiku-buildtools/gcc/gmp/mpf/
H A Dinp_str.c30 size_t alloc_size, str_size; local
38 alloc_size = 100;
39 str = (char *) (*__gmp_allocate_func) (alloc_size);
53 if (str_size >= alloc_size)
55 size_t old_alloc_size = alloc_size;
56 alloc_size = alloc_size * 3 / 2;
57 str = (char *) (*__gmp_reallocate_func) (str, old_alloc_size, alloc_size);
67 if (str_size >= alloc_size)
69 size_t old_alloc_size = alloc_size;
[all...]
H A Dget_str.c123 size_t alloc_size = 0; local
157 alloc_size = n_digits + 2;
311 if (alloc_size != 0)
313 __GMP_REALLOCATE_FUNC_MAYBE_TYPE (dbuf, alloc_size, n_digits + 1, char);
/haiku-buildtools/binutils/libiberty/
H A Dxmemdup.c8 size_t @var{copy_size}, size_t @var{alloc_size})
10 Duplicates a region of memory without fail. First, @var{alloc_size} bytes
35 xmemdup (const PTR input, size_t copy_size, size_t alloc_size) argument
37 PTR output = xmalloc (alloc_size);
38 if (alloc_size > copy_size)
39 memset ((char *) output + copy_size, 0, alloc_size - copy_size);
/haiku-buildtools/gcc/gmp/mpbsd/
H A Dmtox.c34 size_t str_size, alloc_size, i; local
42 MPN_SIZEINBASE_16 (alloc_size, xp, xsize);
43 alloc_size += 1 + (xsign < 0);
45 str = (unsigned char *) (*__gmp_allocate_func) (alloc_size);
52 ASSERT (str_size <= alloc_size - (xsign < 0));
59 ASSERT (strlen (str) + 1 == alloc_size);
H A Dmin.c34 size_t alloc_size, str_size; local
42 alloc_size = 100;
43 str = (char *) (*__gmp_allocate_func) (alloc_size);
67 if (str_size >= alloc_size)
69 size_t old_alloc_size = alloc_size;
70 alloc_size = alloc_size * 3 / 2;
71 str = (char *) (*__gmp_reallocate_func) (str, old_alloc_size, alloc_size);
87 (*__gmp_free_func) (str, alloc_size);
/haiku-buildtools/gcc/gcc/testsuite/c-c++-common/
H A Dattributes-1.c4 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,bar))); /* { dg-warning "outside range" } */
5 void* my_realloc(void*, unsigned) __attribute__((alloc_size(bar))); /* { dg-warning "outside range" } */
13 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,foo))); /* { dg-warning "outside range" } */
14 void* my_realloc(void*, unsigned) __attribute__((alloc_size(foo))); /* { dg-warning "outside range" } */
H A Dpr50459.c9 void *fn5 (int) __attribute__((alloc_size (B)));
/haiku-buildtools/gcc/gmp/mpz/
H A Dget_str.c38 size_t alloc_size = 0; local
65 MPN_SIZEINBASE (alloc_size, PTR(x), ABS(x_size), base);
66 alloc_size += 1 + (x_size<0);
67 res_str = (char *) (*__gmp_allocate_func) (alloc_size);
87 ASSERT (alloc_size == 0 || str_size <= alloc_size - (SIZ(x) < 0));
107 if (alloc_size != 0)
111 __GMP_REALLOCATE_FUNC_MAYBE_TYPE (return_str, alloc_size, actual_size,
H A Dinp_str.c61 size_t alloc_size, str_size; local
123 alloc_size = 100;
124 str = (char *) (*__gmp_allocate_func) (alloc_size);
133 if (str_size >= alloc_size)
135 size_t old_alloc_size = alloc_size;
136 alloc_size = alloc_size * 3 / 2;
137 str = (char *) (*__gmp_reallocate_func) (str, old_alloc_size, alloc_size);
162 (*__gmp_free_func) (str, alloc_size);
/haiku-buildtools/gcc/libiberty/
H A Dxmemdup.c8 size_t @var{copy_size}, size_t @var{alloc_size})
10 Duplicates a region of memory without fail. First, @var{alloc_size} bytes
35 xmemdup (const PTR input, size_t copy_size, size_t alloc_size) argument
37 PTR output = xcalloc (1, alloc_size);
/haiku-buildtools/legacy/binutils/libiberty/
H A Dxmemdup.c7 @deftypefn Replacement void* xmemdup (void *@var{input}, size_t @var{copy_size}, size_t @var{alloc_size})
9 Duplicates a region of memory without fail. First, @var{alloc_size} bytes
34 xmemdup (const PTR input, size_t copy_size, size_t alloc_size) argument
36 PTR output = xcalloc (1, alloc_size);
/haiku-buildtools/gcc/gmp/tests/devel/
H A Dtst-addsub.c46 mp_size_t alloc_size, max_size, size, i, cumul_size; local
62 alloc_size = max_size + 32;
63 s1 = malloc (alloc_size * BYTES_PER_MP_LIMB);
64 s2 = malloc (alloc_size * BYTES_PER_MP_LIMB);
65 dx = malloc (alloc_size * BYTES_PER_MP_LIMB);
66 dy = malloc (alloc_size * BYTES_PER_MP_LIMB);
86 for (i = 0; i < alloc_size; i++)
92 if (cx != cy || mpn_cmp (dx, dy, alloc_size) != 0)
/haiku-buildtools/gcc/gcc/testsuite/c-c++-common/cpp/
H A Dpr63831-1.c6 typedef char T2[__has_attribute (alloc_size) == 1 ? 1 : -1];
21 typedef char T7[__has_attribute (gnu::alloc_size) == 1 ? 1 : -1];
36 typedef char T12[__has_cpp_attribute (alloc_size) == 1 ? 1 : -1];
51 typedef char T17[__has_cpp_attribute (gnu::alloc_size) == 1 ? 1 : -1];
/haiku-buildtools/gcc/gcc/testsuite/g++.dg/asan/
H A Dasan_oob_test.cc77 for (size_t alloc_size = 1; alloc_size <= 8; alloc_size++) {
79 void *p = malloc(alloc_size);
80 // allocated: [p, p + alloc_size)
83 if (offset + access_size <= alloc_size) {
86 int outside_bytes = offset > alloc_size ? (offset - alloc_size) : 0;
/haiku-buildtools/gcc/gcc/testsuite/g++.dg/cpp0x/
H A Dconstexpr-attribute2.C26 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(pos,two)));
27 void* my_realloc(void*, unsigned) __attribute__((alloc_size(two)));
/haiku-buildtools/legacy/gcc/texinfo/info/
H A Dfilesys.c304 int alloc_size; local
307 alloc_size = names_and_files_slots * sizeof (FILENAME_LIST *);
310 (FILENAME_LIST **) xrealloc (names_and_files, alloc_size);
/haiku-buildtools/gcc/gcc/
H A Dggc-page.c332 size_t alloc_size;
886 size_t alloc_size, head_slop, tail_slop;
890 alloc_size = GGC_QUIRE_SIZE * G.pagesize;
892 alloc_size = entry_size + G.pagesize - 1;
893 allocation = XNEWVEC (char, alloc_size);
898 tail_slop = ((size_t) allocation + alloc_size) & (G.pagesize - 1);
900 tail_slop = alloc_size - entry_size - head_slop;
901 enda = allocation + alloc_size - tail_slop;
925 group->alloc_size = alloc_size;
330 size_t alloc_size; member in struct:page_group
883 size_t alloc_size, head_slop, tail_slop; local
[all...]
H A Dtree-object-size.c414 tree alloc_size; local
423 alloc_size = lookup_attribute ("alloc_size",
425 if (alloc_size && TREE_VALUE (alloc_size))
427 tree p = TREE_VALUE (alloc_size);
/haiku-buildtools/isl/
H A Disl_pw_templ.c10 __isl_give PW *FN(PW,alloc_size)(__isl_take isl_space *dim,
13 __isl_give PW *FN(PW,alloc_size)(__isl_take isl_space *dim, int n)
44 return FN(PW,alloc_size)(dim, type, 0);
49 return FN(PW,alloc_size)(dim, 0);
105 pw = FN(PW,alloc_size)(FN(EL,get_space)(el), type, 1);
107 pw = FN(PW,alloc_size)(FN(EL,get_space)(el), 1);
126 dup = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->type, pw->n);
128 dup = FN(PW,alloc_size)(isl_space_copy(pw->dim), pw->n);
372 res = FN(PW,alloc_size)(isl_space_copy(pw1->dim), pw1->type, n);
374 res = FN(PW,alloc_size)(isl_space_cop
[all...]
/haiku-buildtools/gcc/libcpp/
H A Dline-map.c221 unsigned alloc_size; local
238 alloc_size =
244 alloc_size = round_alloc_size (alloc_size);
246 /* Now alloc_size contains the exact memory size we would get if
247 we have asked for the initial alloc_size amount of memory.
251 alloc_size / (sizeof (struct line_map));
/haiku-buildtools/gcc/gcc/config/visium/
H A Dvisium.c3704 const int alloc_size = reg_size ? local_frame_offset + var_size : fsize; local
3706 if (alloc_size > 65535)
3709 emit_insn (gen_movsi (tmp, GEN_INT (alloc_size)));
3716 GEN_INT (-alloc_size))));
3721 GEN_INT (-alloc_size)));
/haiku-buildtools/gcc/liboffloadmic/runtime/
H A Doffload_host.cpp755 int64_t alloc_size; local
799 __arr_data_offset_and_length(ap, alloc_disp, alloc_size);
1176 alloc_size : m_vars[i].size,
1400 alloc_size : m_vars[i].size,
1723 alloc_size : size,
1896 alloc_size : size,

Completed in 297 milliseconds

12