Skip to content
minimal monitor for JS Heap Size via performance.memory
JavaScript HTML
Branch: master
Clone or download
paulirish Merge pull request #35 from shprink/patch-1
Update Angular version link
Latest commit 6fa0f35 Jul 3, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo easier code to grok. Feb 24, 2015 Update Angular version link Jul 2, 2015
bookmarklet.js bookmarklet: whitespace Feb 17, 2015
bower.json 1.0.2 Mar 5, 2015
memory-stats.js promote to its own layer. Feb 24, 2015
package.json 1.0.2 Mar 5, 2015


Like stats.js but for JS memory

@jeromeetienne, inspired by mrdoob's stats.js code, wrote this as part of tquery. I've now promoted it to a standalone repo and cleaned it all up.



  1. Start Chrome with --enable-precise-memory-info
    • Otherwise the results from performance.memory are bucketed and less useful.
  2. Include memory.stats.js
  3. Instantiate it (stats = new MemoryStats(), add the stats.element to the DOM, and run stats.update() regularly.

That might look something like:

    var stats = new MemoryStats(); = 'fixed';        = '0px';       = '0px';
    document.body.appendChild( stats.domElement );

    requestAnimationFrame(function rAFloop(){

Run Chrome with the flag and open demo/index.html to see it in action.

Framework adaptors


You can add this code to any page using the following bookmarklet:

javascript:(function(){var script=document.createElement('script');script.src='';document.head.appendChild(script);})()
You can’t perform that action at this time.