reenable the use of sbrk on wasm as it seems more stable than direct memory_grow

This commit is contained in:
daan 2021-12-16 15:34:52 -08:00
parent 27e24e619b
commit 5bbb2ff416

View file

@ -8,6 +8,8 @@ terms of the MIT license. A copy of the license can be found in the file
#define _DEFAULT_SOURCE // ensure mmap flags are defined #define _DEFAULT_SOURCE // ensure mmap flags are defined
#endif #endif
#define MI_USE_SBRK
#if defined(__sun) #if defined(__sun)
// illumos provides new mman.h api when any of these are defined // illumos provides new mman.h api when any of these are defined
// otherwise the old api based on caddr_t which predates the void pointers one. // otherwise the old api based on caddr_t which predates the void pointers one.
@ -26,6 +28,10 @@ terms of the MIT license. A copy of the license can be found in the file
#pragma warning(disable:4996) // strerror #pragma warning(disable:4996) // strerror
#endif #endif
#if defined(__wasi__)
#define MI_USE_SBRK
#endif
#if defined(_WIN32) #if defined(_WIN32)
#include <windows.h> #include <windows.h>
#elif defined(__wasi__) #elif defined(__wasi__)