{"action":"closed","issue":{"url":"https://api.github.com/repos/diydrones/alceosd/issues/6","repository_url":"https://api.github.com/repos/diydrones/alceosd","labels_url":"https://api.github.com/repos/diydrones/alceosd/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/diydrones/alceosd/issues/6/comments","events_url":"https://api.github.com/repos/diydrones/alceosd/issues/6/events","html_url":"https://github.com/diydrones/alceosd/issues/6","id":147764660,"number":6,"title":"Over memory allocation","user":{"login":"tmojo","id":11688624,"avatar_url":"https://avatars.githubusercontent.com/u/11688624?v=3","gravatar_id":"","url":"https://api.github.com/users/tmojo","html_url":"https://github.com/tmojo","followers_url":"https://api.github.com/users/tmojo/followers","following_url":"https://api.github.com/users/tmojo/following{/other_user}","gists_url":"https://api.github.com/users/tmojo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmojo/subscriptions","organizations_url":"https://api.github.com/users/tmojo/orgs","repos_url":"https://api.github.com/users/tmojo/repos","events_url":"https://api.github.com/users/tmojo/events{/privacy}","received_events_url":"https://api.github.com/users/tmojo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/diydrones/alceosd/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-12T14:14:17Z","updated_at":"2016-05-02T20:32:20Z","closed_at":"2016-05-02T20:32:20Z","body":"In **widgets.c**\r\n```\r\nstruct widgets_mem_s {\r\n    unsigned int mem[MAX_WIDGET_ALLOC_MEM];\r\n```\r\nYou're defining a 4 byte array. Shouldn't that be a `char` array? You're using four times more memory than specified in `MAX_WIDGET_ALLOC_MEM`.\r\nAnd so, \r\n```\r\nvoid* widget_malloc(unsigned int size)\r\n{\r\n    unsigned int *ptr;\r\n```\r\nNeeds to be changed to `char *ptr;`\r\n\r\nVery nice work. Alceosd is quite a beautiful piece of code. I'm very impressed.\r\n"}}