Is There Any Memory Limit for Google Chrome Browser

How to enlarge the memory limit of google chrome?

I cannot reproduce the issue, the memory goes up to about 1.25GB and my CPU stays running (64bit Win7, 32bit chrome), nothing happens after

Try using a 64bit system with more memory and a 64bit browser, most likely you can allocate more memory by doing this.

As Mike suggested maybe JS is not the right choice for such big data (obviously there are better languages like python for processing such an amount of data).

JavaScript memory limit

AFAIK, there is no upper limit, your script can basically use memory until the system runs out of memory (including swap). No upper limit doesn't mean you have to eat it all, users may not like it.

Storage limits on Chrome browser

Warning - this information is outdated - see the other answer below.

Chrome has a 5mb soft limit before it hits a QUOTA_ERR. Here's a MDN reference to that fact.

The spec mentions a QuotaExceededError but doesn't seem to say anything about when it should be thrown.

QuotaExceededError The operation failed because there was not enough
remaining storage space, or the storage quota was reached and the user
declined to give more space to the database.

I've not heard of a hard limit and not reached one in my own development. Performance should go pretty far south before you reach it.

Is there any memory restriction in Chrome Extension

Yes there is a limit, it is laid out quite clearly in the docs.

Looks like for the maximum total storage size is 800kB [0].

For the maximum is 5MB [0], unless you request unlimitedStorage so this API should be more useful to you.

[0] Source

How to catch and handle Chrome memory crash?

Unfortunately there is no way to "catch and handle" an out-of-memory error, sorry. By design, for security reasons, V8 always crashes the process when it cannot allocate memory it needs.

The memory limit for the JavaScript heap is determined dynamically based on the amount of physical memory that the machine has. For several years, given "sufficient" RAM, it was 700 MB on 32-bit desktop architectures and 1400 MB on 64-bit architectures; however recent versions of Chrome/V8 have been tuning the strategy and the upper limit is now 2048MB on 64-bit. So yes, the specifics can change over time. The OS does not matter, though (at least not for the JavaScript heap).

I'm not entirely sure whether AudioBuffers count towards V8's heap limit (V8 itself doesn't know about AudioBuffers, they're implemented by the embedder, i.e. Blink).

Note that you may not be able to use every last byte up to that maximum. Some memory is used for internal metadata; and when you grow arrays and the like dynamically, they grow in chunks, which makes it likely that an attempt to grow hits the limit even though the pre-growth size was not "maximum minus one". On 32-bit platforms, trying to allocate a single large object can also fail due to address space exhaustion: after a number of randomly selected pages have been allocated for this and that over the lifetime of the process, there might simply not be a sufficiently large contiguous block of address space available to allocate a several-hundred-megabytes large object, even if the heap limit isn't reached yet.

Side note: "three times larger"? For commonly used MP3 bitrates, I'd expect WAV files to be up to 10 times larger.

Related Topics

Leave a reply