Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: src/wasm/wasm-module.h

Issue 1597163002: wasm: change the module memory size to be multiples of the page size, 64k. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index d18c301408fb83824aa70ce4964d741594e43e92..510ac3c59f60faa975e1709ab5141fe9bac71acd 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -103,14 +103,15 @@ enum ModuleOrigin { kWasmOrigin, kAsmJsOrigin };
// Static representation of a module.
struct WasmModule {
- static const uint8_t kMinMemSize = 12; // Minimum memory size = 4kb
- static const uint8_t kMaxMemSize = 30; // Maximum memory size = 1gb
+ static const uint32_t kPageSize = 0x10000; // Page size, 64kb.
+ static const uint32_t kMinMemPages = 1; // Minimum memory size = 64kb
+ static const uint32_t kMaxMemPages = 16384; // Maximum memory size = 1gb
Isolate* shared_isolate; // isolate for storing shared code.
const byte* module_start; // starting address for the module bytes.
const byte* module_end; // end address for the module bytes.
- uint8_t min_mem_size_log2; // minimum size of the memory (log base 2).
- uint8_t max_mem_size_log2; // maximum size of the memory (log base 2).
+ uint32_t min_mem_pages; // minimum size of the memory in 64k pages.
+ uint32_t max_mem_pages; // maximum size of the memory in 64k pages.
bool mem_export; // true if the memory is exported.
bool mem_external; // true if the memory is external.
int start_function_index; // start function, if any.
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698