* headers.c (GC_scratch_alloc): Do not reassign "bytes_to_get" local
variable to avoid compiler warning in case of ROUNDUP_PAGESIZE_IF_MMAP
is a no-op (i.e., assign bytes_to_get only once directly to a rounded
value).
return result;
}
- bytes_to_get = MINHINCR * HBLKSIZE;
- if (bytes_to_get <= bytes) {
+ if (bytes >= MINHINCR * HBLKSIZE) {
bytes_to_get = ROUNDUP_PAGESIZE_IF_MMAP(bytes);
result = (ptr_t)GET_MEM(bytes_to_get);
GC_add_to_our_memory(result, bytes_to_get);
return result;
}
- bytes_to_get = ROUNDUP_PAGESIZE_IF_MMAP(bytes_to_get); /* for safety */
+ bytes_to_get = ROUNDUP_PAGESIZE_IF_MMAP(MINHINCR * HBLKSIZE);
+ /* round up for safety */
result = (ptr_t)GET_MEM(bytes_to_get);
GC_add_to_our_memory(result, bytes_to_get);
if (NULL == result) {