Remove maximum memory limits

This commit is contained in:
Maximilian Ammann 2022-09-15 16:57:32 +02:00
parent b6a4a8a66e
commit 851a02cd69
2 changed files with 4 additions and 5 deletions

View File

@ -22,8 +22,7 @@ export const startMapLibre = async (wasmPath: string | undefined, workerPath: st
}
preventDefaultTouchActions();
let MEMORY_PAGES = 16 * 1024
const memory = new WebAssembly.Memory({initial: 1024, maximum: MEMORY_PAGES, shared: false})
const memory = new WebAssembly.Memory({initial: 1024, shared: false})
await init(wasmPath, memory);
let callback = [undefined]

View File

@ -1,9 +1,9 @@
import init, {unsync_worker_entry} from "../wasm/maplibre"
onmessage = async message => {
let MEMORY_PAGES = 16 * 1024
const memory = new WebAssembly.Memory({initial: 1024, maximum: MEMORY_PAGES, shared: false})
const initialised = init(message.data[0], memory).catch(err => {
const memory = new WebAssembly.Memory({initial: 1024, shared: false})
let module = message.data[0];
const initialised = init(module, memory).catch(err => {
// Propagate to main `onerror`:
setTimeout(() => {
throw err;