{"action":"created","issue":{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/264","labels_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/264/comments","events_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/264/events","html_url":"https://github.com/intel-iot-devkit/mraa/issues/264","id":103843510,"number":264,"title":"Memory Leak in nodejs module on RPIA+","user":{"login":"leonyuhanov","id":7405342,"avatar_url":"https://avatars.githubusercontent.com/u/7405342?v=3","gravatar_id":"","url":"https://api.github.com/users/leonyuhanov","html_url":"https://github.com/leonyuhanov","followers_url":"https://api.github.com/users/leonyuhanov/followers","following_url":"https://api.github.com/users/leonyuhanov/following{/other_user}","gists_url":"https://api.github.com/users/leonyuhanov/gists{/gist_id}","starred_url":"https://api.github.com/users/leonyuhanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonyuhanov/subscriptions","organizations_url":"https://api.github.com/users/leonyuhanov/orgs","repos_url":"https://api.github.com/users/leonyuhanov/repos","events_url":"https://api.github.com/users/leonyuhanov/events{/privacy}","received_events_url":"https://api.github.com/users/leonyuhanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-29T10:28:41Z","updated_at":"2015-08-30T06:42:47Z","closed_at":null,"body":"Team I'm running into an old issue where im getting a memory leak by using the mraa.write(buffer).\r\nMy code sends about 4000 bytes in 1 frame at 4mhz at teh moment. and after about 2 minutes runtime the program goes form 40mb in top to 80mb... I ran into this problem on the Galileo Gen2 board but it was fixed previously...I checked the source code on my rp and it matches the fix...but still having this issue"},"comment":{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/comments/136092485","html_url":"https://github.com/intel-iot-devkit/mraa/issues/264#issuecomment-136092485","issue_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/264","id":136092485,"user":{"login":"leonyuhanov","id":7405342,"avatar_url":"https://avatars.githubusercontent.com/u/7405342?v=3","gravatar_id":"","url":"https://api.github.com/users/leonyuhanov","html_url":"https://github.com/leonyuhanov","followers_url":"https://api.github.com/users/leonyuhanov/followers","following_url":"https://api.github.com/users/leonyuhanov/following{/other_user}","gists_url":"https://api.github.com/users/leonyuhanov/gists{/gist_id}","starred_url":"https://api.github.com/users/leonyuhanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonyuhanov/subscriptions","organizations_url":"https://api.github.com/users/leonyuhanov/orgs","repos_url":"https://api.github.com/users/leonyuhanov/repos","events_url":"https://api.github.com/users/leonyuhanov/events{/privacy}","received_events_url":"https://api.github.com/users/leonyuhanov/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T06:42:47Z","updated_at":"2015-08-30T06:42:47Z","body":"Update...\r\nNot 100% sure this is a problem with MRAA... May be a problem with iether NodeJS or the SPI driver on the RpiA+..\r\nI ran 2 bits of code:\r\n1: Send out 128Bytes of data in a tight while loop:\r\nwhile(true)\r\n{\r\n spiDevice.write(dataBuffer);\r\n}\r\nRAM usage climbs until I kill the script or until the Device crashes. \r\n2: send out 128Bytes of data in a tight loop but delay each write with a console.log or a delay function\r\nwhile(true)\r\n{\r\n spiDevice.write(dataBuffer);\r\nconsole.log(\"delaying with concolelog\");\r\n}\r\nRam usage is steady...\r\n3: send out 1000 blocks of 128 bytes of data in a tight loop\r\n\r\nvar counter=0\r\nwhile(true)\r\n{\r\n spiDevice.write(dataBuffer);\r\ncounter++;\r\n if(counter>1000)\r\n {\r\n counter=0; \r\n console.log(\"delaying with text\");\r\n }\r\n}\r\nRAM usage climbs whilst data is transmitted, then after the 1st pause, drops and stays steady..."}}