{"action":"created","issue":{"url":"https://api.github.com/repos/Samsung/iotjs/issues/444","repository_url":"https://api.github.com/repos/Samsung/iotjs","labels_url":"https://api.github.com/repos/Samsung/iotjs/issues/444/labels{/name}","comments_url":"https://api.github.com/repos/Samsung/iotjs/issues/444/comments","events_url":"https://api.github.com/repos/Samsung/iotjs/issues/444/events","html_url":"https://github.com/Samsung/iotjs/pull/444","id":182674863,"number":444,"title":"Don't allocate 1 byte heap memory for Null String","user":{"login":"glistening","id":12553213,"avatar_url":"https://avatars.githubusercontent.com/u/12553213?v=3","gravatar_id":"","url":"https://api.github.com/users/glistening","html_url":"https://github.com/glistening","followers_url":"https://api.github.com/users/glistening/followers","following_url":"https://api.github.com/users/glistening/following{/other_user}","gists_url":"https://api.github.com/users/glistening/gists{/gist_id}","starred_url":"https://api.github.com/users/glistening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glistening/subscriptions","organizations_url":"https://api.github.com/users/glistening/orgs","repos_url":"https://api.github.com/users/glistening/repos","events_url":"https://api.github.com/users/glistening/events{/privacy}","received_events_url":"https://api.github.com/users/glistening/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-13T01:43:39Z","updated_at":"2016-10-13T06:10:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Samsung/iotjs/pulls/444","html_url":"https://github.com/Samsung/iotjs/pull/444","diff_url":"https://github.com/Samsung/iotjs/pull/444.diff","patch_url":"https://github.com/Samsung/iotjs/pull/444.patch"},"body":"With recently merged commit #54cd255 for fixing #323, we allocate 1\r\nbyte memory with malloc for every null string. Previously, null string\r\nis represented by setting _data to NULL. I think memory defragmentation\r\nshould be considered more carefully in iot environment since it has\r\nsmall memory. Although this patch make it easy to remove many bugs\r\nrelating non-nullchecked access, I think previous approach, i.e. without\r\nallocation, is more suit for iotjs. If maintainers think the commit\r\nseems good, at least, making null string as singleton would be better.\r\n\r\nI checked tc issue-323.js pass with null check in libtuv.\r\n\r\nIoT.js-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com"},"comment":{"url":"https://api.github.com/repos/Samsung/iotjs/issues/comments/253423036","html_url":"https://github.com/Samsung/iotjs/pull/444#issuecomment-253423036","issue_url":"https://api.github.com/repos/Samsung/iotjs/issues/444","id":253423036,"user":{"login":"LaszloLango","id":10030017,"avatar_url":"https://avatars.githubusercontent.com/u/10030017?v=3","gravatar_id":"","url":"https://api.github.com/users/LaszloLango","html_url":"https://github.com/LaszloLango","followers_url":"https://api.github.com/users/LaszloLango/followers","following_url":"https://api.github.com/users/LaszloLango/following{/other_user}","gists_url":"https://api.github.com/users/LaszloLango/gists{/gist_id}","starred_url":"https://api.github.com/users/LaszloLango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaszloLango/subscriptions","organizations_url":"https://api.github.com/users/LaszloLango/orgs","repos_url":"https://api.github.com/users/LaszloLango/repos","events_url":"https://api.github.com/users/LaszloLango/events{/privacy}","received_events_url":"https://api.github.com/users/LaszloLango/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T06:10:00Z","updated_at":"2016-10-13T06:10:00Z","body":"You just reverted 54cd255 but I don't see what happened with the Segmentation fault previously reported. What is the result of the `test/run_pass/issue/issue-323.js`?"}}
{"actor":{"display_login":"LaszloLango"}}