Implement Memory64 support for AOT (#3362)
Refer to: https://github.com/bytecodealliance/wasm-micro-runtime/pull/3266 https://github.com/bytecodealliance/wasm-micro-runtime/issues/3091
This commit is contained in:
@ -1005,15 +1005,7 @@ wasm_allocate_linear_memory(uint8 **data, bool is_shared_memory,
|
||||
page_size = os_getpagesize();
|
||||
*memory_data_size = init_page_count * num_bytes_per_page;
|
||||
|
||||
#if WASM_ENABLE_MEMORY64 != 0
|
||||
if (is_memory64) {
|
||||
bh_assert(*memory_data_size <= MAX_LINEAR_MEM64_MEMORY_SIZE);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
bh_assert(*memory_data_size <= MAX_LINEAR_MEMORY_SIZE);
|
||||
}
|
||||
bh_assert(*memory_data_size <= GET_MAX_LINEAR_MEMORY_SIZE(is_memory64));
|
||||
*memory_data_size = align_as_and_cast(*memory_data_size, page_size);
|
||||
|
||||
if (map_size > 0) {
|
||||
|
||||
Reference in New Issue
Block a user