Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
¿Cómo aumento el tamaño del montón de memoria de forja de electrones?

Tengo una aplicación de plantilla hecha con forja de electrones, y cuando intento ejecutar el siguiente código

 const ARRAY_LENGTH = 1.1e8; const randomArray = []; for (let i = 0; i < ARRAY_LENGTH; i += 1) { randomArray.push(Math.random()); }

Creo que me quedé sin memoria con el siguiente error:

 <--- Last few GCs ---> [23850:0x7900000000] 16762 ms: Mark-sweep (reduce) 3622.1 (3706.7) -> 3478.0 (3562.6) MB, 1806.7 / 0.0 ms (+ 0.5 ms in 1 steps since start of marking, biggest step 0.5 ms, walltime since start of marking 2717 ms) (average mu = 0.589, current mu = 0.60[23850:0x7900000000] 20404 ms: Mark-sweep (reduce) 3478.0 (3562.6) -> 3286.0 (3370.6) MB, 3640.7 / 0.0 ms (average mu = 0.307, current mu = 0.000) last resort GC in old space requested <--- JS stacktrace --->

Me pregunto cómo aumento la memoria disponible para el proceso.

Nota: intenté agregar el script de precarga en forge.config.js como se describe aquí , usando lo siguiente (sin éxito, aunque el script de precarga se ejecuta):

 // preload.ts import { remote } from 'electron'; remote.app.commandLine.appendSwitch('js-flags', '--max-old-space-size=8192');
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!