mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-31 12:04:29 -04:00
avoid trying to use mremap outside of Linux
This commit is contained in:
parent
934ab4cb59
commit
a32e26b8e9
3 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue