diff options
Diffstat (limited to 'include/wabt/interp/interp-inl.h')
-rw-r--r-- | include/wabt/interp/interp-inl.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/wabt/interp/interp-inl.h b/include/wabt/interp/interp-inl.h index 1f3402c6..a9ac4a34 100644 --- a/include/wabt/interp/interp-inl.h +++ b/include/wabt/interp/interp-inl.h @@ -64,11 +64,12 @@ inline bool MemoryType::classof(const ExternType* type) { return type->kind == skind; } -inline MemoryType::MemoryType(Limits limits) - : ExternType(ExternKind::Memory), limits(limits) { +inline MemoryType::MemoryType(Limits limits, uint32_t page_size) + : ExternType(ExternKind::Memory), limits(limits), page_size(page_size) { // Always set max. if (!limits.has_max) { - this->limits.max = limits.is_64 ? WABT_MAX_PAGES64 : WABT_MAX_PAGES32; + this->limits.max = WABT_BYTES_TO_MIN_PAGES( + (limits.is_64 ? UINT64_MAX : UINT32_MAX), page_size); } } |