Lines Matching refs:ALIGNMENT
26 #define ALIGNMENT ((size_t) 16) macro
50 if (size > SIZE_MAX - ALIGNMENT) in jbig2_fuzzer_alloc()
52 if (size + ALIGNMENT > MAX_ALLOCATION - used) in jbig2_fuzzer_alloc()
53 return jbig2_fuzzer_reached_limit(0, size + ALIGNMENT); in jbig2_fuzzer_alloc()
55 ptr = (char *) malloc(size + ALIGNMENT); in jbig2_fuzzer_alloc()
60 used += size + ALIGNMENT; in jbig2_fuzzer_alloc()
62 return ptr + ALIGNMENT; in jbig2_fuzzer_alloc()
71 if (ptr < (void *) ALIGNMENT) in jbig2_fuzzer_free()
74 ptr = (char *) ptr - ALIGNMENT; in jbig2_fuzzer_free()
77 used -= size + ALIGNMENT; in jbig2_fuzzer_free()
88 if (old < (void *) ALIGNMENT) in jbig2_fuzzer_realloc()
95 if (size > SIZE_MAX - ALIGNMENT) in jbig2_fuzzer_realloc()
98 old = (char *) old - ALIGNMENT; in jbig2_fuzzer_realloc()
101 if (size + ALIGNMENT > MAX_ALLOCATION - used + oldsize + ALIGNMENT) in jbig2_fuzzer_realloc()
102 return jbig2_fuzzer_reached_limit(oldsize + ALIGNMENT, size + ALIGNMENT); in jbig2_fuzzer_realloc()
104 ptr = (char *) realloc(old, size + ALIGNMENT); in jbig2_fuzzer_realloc()
108 used -= oldsize + ALIGNMENT; in jbig2_fuzzer_realloc()
110 used += size + ALIGNMENT; in jbig2_fuzzer_realloc()
112 return ptr + ALIGNMENT; in jbig2_fuzzer_realloc()