• Home
  • Raw
  • Download

Lines Matching refs:size3

94 static inline void *safe_malloc_add_3op_(size_t size1, size_t size2, size_t size3)  in safe_malloc_add_3op_()  argument
99 size3 += size2; in safe_malloc_add_3op_()
100 if(size3 < size2) in safe_malloc_add_3op_()
102 return safe_malloc_(size3); in safe_malloc_add_3op_()
105 static inline void *safe_malloc_add_4op_(size_t size1, size_t size2, size_t size3, size_t size4) in safe_malloc_add_4op_() argument
110 size3 += size2; in safe_malloc_add_4op_()
111 if(size3 < size2) in safe_malloc_add_4op_()
113 size4 += size3; in safe_malloc_add_4op_()
114 if(size4 < size3) in safe_malloc_add_4op_()
121 static inline void *safe_malloc_mul_3op_(size_t size1, size_t size2, size_t size3) in safe_malloc_mul_3op_() argument
123 if(!size1 || !size2 || !size3) in safe_malloc_mul_3op_()
128 if(size1 > SIZE_MAX / size3) in safe_malloc_mul_3op_()
130 return malloc(size1*size3); in safe_malloc_mul_3op_()
134 static inline void *safe_malloc_mul2add_(size_t size1, size_t size2, size_t size3) in safe_malloc_mul2add_() argument
137 return safe_malloc_(size3); in safe_malloc_mul2add_()
140 return safe_malloc_add_2op_(size1*size2, size3); in safe_malloc_mul2add_()
144 static inline void *safe_malloc_muladd2_(size_t size1, size_t size2, size_t size3) in safe_malloc_muladd2_() argument
146 if(!size1 || (!size2 && !size3)) in safe_malloc_muladd2_()
148 size2 += size3; in safe_malloc_muladd2_()
149 if(size2 < size3) in safe_malloc_muladd2_()
174 static inline void *safe_realloc_add_3op_(void *ptr, size_t size1, size_t size2, size_t size3) in safe_realloc_add_3op_() argument
179 size3 += size2; in safe_realloc_add_3op_()
180 if(size3 < size2) in safe_realloc_add_3op_()
182 return realloc(ptr, size3); in safe_realloc_add_3op_()
185 static inline void *safe_realloc_add_4op_(void *ptr, size_t size1, size_t size2, size_t size3, size… in safe_realloc_add_4op_() argument
190 size3 += size2; in safe_realloc_add_4op_()
191 if(size3 < size2) in safe_realloc_add_4op_()
193 size4 += size3; in safe_realloc_add_4op_()
194 if(size4 < size3) in safe_realloc_add_4op_()
209 static inline void *safe_realloc_muladd2_(void *ptr, size_t size1, size_t size2, size_t size3) in safe_realloc_muladd2_() argument
211 if(!size1 || (!size2 && !size3)) in safe_realloc_muladd2_()
213 size2 += size3; in safe_realloc_muladd2_()
214 if(size2 < size3) in safe_realloc_muladd2_()