I’m writing an application that instantiates many large array buffers, some of which are 5MB. I would like to know when I’m about to fill up the javascript heap, so I could activate a condition in my javascript that halts allocating the buffers. I’ve found that if I do exceed the heap size, the browser crashes for Chrome and Firefox.
Does W3C expose an interface for gauging javascript heap usage?