{"action":"created","issue":{"url":"https://api.github.com/repos/mdaines/viz.js/issues/45","labels_url":"https://api.github.com/repos/mdaines/viz.js/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/mdaines/viz.js/issues/45/comments","events_url":"https://api.github.com/repos/mdaines/viz.js/issues/45/events","html_url":"https://github.com/mdaines/viz.js/issues/45","id":105071676,"number":45,"title":"Cannot enlarge memory arrays. Probably memory leak?","user":{"login":"p1o2p3u1","id":4536719,"avatar_url":"https://avatars.githubusercontent.com/u/4536719?v=3","gravatar_id":"","url":"https://api.github.com/users/p1o2p3u1","html_url":"https://github.com/p1o2p3u1","followers_url":"https://api.github.com/users/p1o2p3u1/followers","following_url":"https://api.github.com/users/p1o2p3u1/following{/other_user}","gists_url":"https://api.github.com/users/p1o2p3u1/gists{/gist_id}","starred_url":"https://api.github.com/users/p1o2p3u1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p1o2p3u1/subscriptions","organizations_url":"https://api.github.com/users/p1o2p3u1/orgs","repos_url":"https://api.github.com/users/p1o2p3u1/repos","events_url":"https://api.github.com/users/p1o2p3u1/events{/privacy}","received_events_url":"https://api.github.com/users/p1o2p3u1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-06T05:21:06Z","updated_at":"2015-09-13T14:57:39Z","closed_at":"2015-09-13T14:35:45Z","body":"I use websocket to draw graphs dynamically using viz.js. However when the Viz function is called too much times it will throw the following error\r\n```javascript\r\nUncaught abort(\"Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.\") at Error\r\n    at jsStackTrace (http://localhost:8889/static/js/viz.js:5:22063)\r\n    at stackTrace (http://localhost:8889/static/js/viz.js:5:22246)\r\n    at abort (http://localhost:8889/static/js/viz.js:28:10646)\r\n    at enlargeMemory (http://localhost:8889/static/js/viz.js:5:22596)\r\n    at Function.Runtime.dynamicAlloc [as alloc] (http://localhost:8889/static/js/viz.js:5:6520)\r\n    at _sbrk (http://localhost:8889/static/js/viz.js:5:604858)\r\n    at A1 (http://localhost:8889/static/js/viz.js:20:81202)\r\n    at rK (http://localhost:8889/static/js/viz.js:12:187893)\r\n    at qK (http://localhost:8889/static/js/viz.js:12:187625)\r\n    at dg (http://localhost:8889/static/js/viz.js:11:139350)\r\n``` \r\n\r\nYou can open your Chrome console and run the following code and it will give you the same error message\r\n```javascript\r\nfor(var i=0; i<5000; i++){Viz(\"digraph { a -> b; }\");}\r\n```"},"comment":{"url":"https://api.github.com/repos/mdaines/viz.js/issues/comments/139885003","html_url":"https://github.com/mdaines/viz.js/issues/45#issuecomment-139885003","issue_url":"https://api.github.com/repos/mdaines/viz.js/issues/45","id":139885003,"user":{"login":"mdaines","id":1383,"avatar_url":"https://avatars.githubusercontent.com/u/1383?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaines","html_url":"https://github.com/mdaines","followers_url":"https://api.github.com/users/mdaines/followers","following_url":"https://api.github.com/users/mdaines/following{/other_user}","gists_url":"https://api.github.com/users/mdaines/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaines/subscriptions","organizations_url":"https://api.github.com/users/mdaines/orgs","repos_url":"https://api.github.com/users/mdaines/repos","events_url":"https://api.github.com/users/mdaines/events{/privacy}","received_events_url":"https://api.github.com/users/mdaines/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T14:57:39Z","updated_at":"2015-09-13T14:57:39Z","body":"https://github.com/mdaines/viz.js/releases/tag/1.0.1"}}