Allow memory size of 2GB
This commit is contained in:
parent
e981114dd7
commit
4a90ec6256
|
@ -21,6 +21,8 @@ var ASYNC_SAFE = false;
|
|||
// Reads len characters at offset from Memory object mem as a JS string
|
||||
v86util.read_sized_string_from_mem = function read_sized_string_from_mem(mem, offset, len)
|
||||
{
|
||||
offset >>>= 0;
|
||||
len >>>= 0;
|
||||
return String.fromCharCode(...new Uint8Array(mem.buffer, offset, len));
|
||||
};
|
||||
|
||||
|
|
|
@ -1324,6 +1324,9 @@ var seen_code_uncompiled = {};
|
|||
|
||||
CPU.prototype.codegen_finalize = function(wasm_table_index, start, state_flags, ptr, len)
|
||||
{
|
||||
ptr >>>= 0;
|
||||
len >>>= 0;
|
||||
|
||||
dbg_assert(wasm_table_index >= 0 && wasm_table_index < WASM_TABLE_SIZE);
|
||||
|
||||
const code = new Uint8Array(this.wm.instance.exports.memory.buffer, ptr, len);
|
||||
|
|
Loading…
Reference in a new issue