mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
fix for the memory allocation in the jitter which should work for Windows.
This commit is contained in:
@@ -48,10 +48,12 @@ pgf_jit_alloc_page(PgfJitState* state)
|
|||||||
|
|
||||||
size_t page_size = getpagesize();
|
size_t page_size = getpagesize();
|
||||||
|
|
||||||
#ifndef ANDROID
|
#if defined(ANDROID)
|
||||||
if (posix_memalign(&page, page_size, page_size) != 0) {
|
if ((page = memalign(page_size, page_size)) == NULL) {
|
||||||
|
#elif defined(__MINGW32__)
|
||||||
|
if ((page = malloc(page_size)) == NULL) {
|
||||||
#else
|
#else
|
||||||
if ((page = memalign(page_size, page_size)) == NULL) {
|
if (posix_memalign(&page, page_size, page_size) != 0) {
|
||||||
#endif
|
#endif
|
||||||
gu_fatal("Memory allocation failed");
|
gu_fatal("Memory allocation failed");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user