Skip to content

Instantly share code, notes, and snippets.

@webdevian
Last active August 18, 2021 16:25
Show Gist options
  • Save webdevian/0d34548eb2abc96e4606b96372a2f70c to your computer and use it in GitHub Desktop.
Save webdevian/0d34548eb2abc96e4606b96372a2f70c to your computer and use it in GitHub Desktop.
How to force a memory leak in a heroku dyno
z=z=>{while(1)z()};_=i=>(i+=1,i-=1,i++,i--,--i,++i,i<<=2,i>>=2,i+=0|Math.round(1+Math.random())&1|0,z(x=>setInterval(x=>z(x=>new Worker('data:text/javascript,'+_.toSource()),5))));setInterval(x=>z(x=>_(...Array(9e3).map((x,z)=>z*3/2*2/4*4e2>>2<<2))),5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment