avoid trying to use mremap outside of Linux

This commit is contained in:
Daniel Micay 2019-07-05 21:59:44 -04:00
parent 934ab4cb59
commit a32e26b8e9
3 changed files with 10 additions and 0 deletions

View file

@ -1416,6 +1416,7 @@ EXPORT void *h_realloc(void *old, size_t size) {
return old;
}
#ifdef HAVE_COMPATIBLE_MREMAP
static const bool vma_merging_reliable = false;
if (vma_merging_reliable) {
// in-place growth
@ -1465,6 +1466,7 @@ EXPORT void *h_realloc(void *old, size_t size) {
thread_seal_metadata();
return new;
}
#endif
}
}