diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h index 327be9c7e..56e74f372 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1281,6 +1281,7 @@ public: class Memory { public: static const Address::address_t kPageSize = 64 * 1024; + static const Address::address_t kMaxSize = ~Address::address_t(0) / kPageSize; static const Address::address_t kPageMask = ~(kPageSize - 1); struct Segment { Address offset; @@ -1299,7 +1300,7 @@ public: std::vector<Segment> segments; Name exportName; - Memory() : initial(0), max(-1U) {} + Memory() : initial(0), max(kMaxSize) {} }; class Module { |