Is it possible to increase the memory of deno to use 2 arrays of 1 GB each? #10686
-
Hello Is it possible to increase the memory of deno to use 2 arrays of 1 GB each? I'm doing calculations for 3D fractal visualization. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, I found the solution: ---- test.cmd ---- --- test.ts --- for (let index = 0; index < a1.length; index++) { await Deno.writeFile("a1.bin",a1) |
Beta Was this translation helpful? Give feedback.
Hello, I found the solution:
--v8-flags=--max-old-space-size=8000
---- test.cmd ----
deno run --v8-flags=--max-old-space-size=8000 --unstable --allow-read --allow-write .\test.ts
--- test.ts ---
`let a1 : Uint8Array = new Uint8Array(1000 * 1000 * 1000)
let a2 : Uint8Array = new Uint8Array(1000 * 1000 * 1000)
let a3 : Uint8Array = new Uint8Array(1000 * 1000 * 1000)
let a4 : Uint8Array = new Uint8Array(1000 * 1000 * 1000)
for (let index = 0; index < a1.length; index++) {
a1[index] = index % 254
a2[index] = (index+1) % 254
a3[index] = (index+2) % 254
a4[index] = (index+3) % 254
}
await Deno.writeFile("a1.bin",a1)
await Deno.writeFile("a2.bin",a2)
await Deno.writeFile("a3.bin",a3)
await Deno.…