Marcin Kolny
2024-05-13 04:03:38 +01:00
committed by GitHub
parent c85bada2a9
commit fe5e7a9981
26 changed files with 521 additions and 294 deletions

View File

@ -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) {