diff --git a/web/lib/src/unsync/index.ts b/web/lib/src/unsync/index.ts index 13e1f06d..55144e8e 100644 --- a/web/lib/src/unsync/index.ts +++ b/web/lib/src/unsync/index.ts @@ -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] diff --git a/web/lib/src/unsync/pool.worker.ts b/web/lib/src/unsync/pool.worker.ts index 05417b88..4af245c3 100644 --- a/web/lib/src/unsync/pool.worker.ts +++ b/web/lib/src/unsync/pool.worker.ts @@ -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;