How to programmatically find out when Im will exceed the javascript heap size?

Im writing an application that creates many large array buffers, some of which are 5 MB. I would like to know when Im going to fill a bunch of javascript so that I can activate a condition in my javascript that stops the allocation of buffers. Ive found that if I exceed the heap size, the browser will crash for Chrome and Firefox.

Does W3C provide an interface for evaluating javascript heap usage?

+6
source share
1 answer

No.

JavaScript ( ECMA-262 5.1 Edition ) language does not indicate such functionality.

+2
source

Source: https://habr.com/ru/post/978105/


All Articles