138 |
|
#ifdef HAVE_MMAP_VM |
139 |
|
const int extra_map_flags = translate_map_flags(options); |
140 |
|
|
141 |
< |
if ((addr = mmap((caddr_t)next_address, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags, zero_fd, 0)) == MAP_FAILED) |
141 |
> |
if ((addr = mmap((caddr_t)next_address, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags, zero_fd, 0)) == (void *)MAP_FAILED) |
142 |
|
return VM_MAP_FAILED; |
143 |
|
|
144 |
|
// Sanity checks for 64-bit platforms |
184 |
|
#ifdef HAVE_MMAP_VM |
185 |
|
const int extra_map_flags = translate_map_flags(options); |
186 |
|
|
187 |
< |
if (mmap((caddr_t)addr, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags | MAP_FIXED, zero_fd, 0) == MAP_FAILED) |
187 |
> |
if (mmap((caddr_t)addr, size, VM_PAGE_DEFAULT, extra_map_flags | map_flags | MAP_FIXED, zero_fd, 0) == (void *)MAP_FAILED) |
188 |
|
return -1; |
189 |
|
|
190 |
|
// Since I don't know the standard behavior of mmap(), zero-fill here |