summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 6cbe93e3b..ce6b9d294 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1074,6 +1074,8 @@ public:
class Memory {
public:
+ static const size_t kPageSize = 64 * 1024;
+ static const size_t kPageMask = ~(kPageSize - 1);
struct Segment {
size_t offset;
const char* data;
@@ -1082,7 +1084,7 @@ public:
Segment(size_t offset, const char *data, size_t size) : offset(offset), data(data), size(size) {}
};
- size_t initial, max;
+ size_t initial, max; // sizes are in pages
std::vector<Segment> segments;
Memory() : initial(0), max((uint32_t)-1) {}