Improved docs on emscripten memory instantiation

This commit is contained in:
Syrus Akbary 2018-11-29 22:46:52 -08:00
parent 4ac6d4838f
commit b5e93ecae8

View File

@ -468,6 +468,7 @@ impl Instance {
let memory = if options.use_emscripten { let memory = if options.use_emscripten {
// We use MAX_PAGES, so at the end the result is: // We use MAX_PAGES, so at the end the result is:
// (initial * LinearMemory::PAGE_SIZE) == LinearMemory::DEFAULT_HEAP_SIZE // (initial * LinearMemory::PAGE_SIZE) == LinearMemory::DEFAULT_HEAP_SIZE
// However, it should be: (initial * LinearMemory::PAGE_SIZE) == 16777216
LinearMemory::new(LinearMemory::MAX_PAGES as u32, None) LinearMemory::new(LinearMemory::MAX_PAGES as u32, None)
} }
else { else {