Using js-flags with --max_old_space_size=2000 doesn't increase the memory limit

507 views
Skip to first unread message

Miguel Caballero Pinto

unread,
Apr 27, 2016, 5:04:54 PM4/27/16
to v8-users
Hi there!

We use Electron framework for our application that creates renderer processes that under the cover uses V8. We would like to increase the memory limit of those processes to 2000mb (BTW, we found that increasing the memory limit any further will make the process to instantly crash), for that when creating a new renderer process we set the flag: js-flags="--max_old_space_size=2000", however the process still crashes when reaching its default memory limit, ~1,400mb. 

The environment were we found this behavior is Windows 32 bits.

Is there anything else we should be doing? Do you know how else we can increase the default memory limit?

Thank you very much for your time!

Ben Noordhuis

unread,
Apr 28, 2016, 2:26:54 AM4/28/16
to v8-users
See [0], the address space on 32 bits Windows is limited to 2 GB. In
other words, code + C heap + JS heap can not be > 2 GB.

It's possible to reconfigure the system to use a 3GB/1GB split but
that's something the system administrator needs to do. You also need
to rebuild your application with the /LARGEADDRESSAWARE switch.

[0] https://msdn.microsoft.com/en-us/library/windows/desktop/aa366912%28v=vs.85%29.aspx

Miguel Caballero Pinto

unread,
Apr 28, 2016, 2:34:36 PM4/28/16
to v8-users
Thanks Ben!

I understand the limitations. However, shouldn't then the application crash when the memory usage is around 2GB limit and not around 1400mb?

Ben Noordhuis

unread,
May 2, 2016, 6:42:33 AM5/2/16
to v8-users
On Thu, Apr 28, 2016 at 8:34 PM, Miguel Caballero Pinto
<mcaball...@gmail.com> wrote:
> Thanks Ben!
>
> I understand the limitations. However, shouldn't then the application crash
> when the memory usage is around 2GB limit and not around 1400mb?

I wouldn't expect so. That 1.4 GB is just the JS heap; the C heap,
libraries, and so on, all need address space of their own.
Reply all
Reply to author
Forward
0 new messages