{"action":"created","comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/48750150","id":48750150,"diff_hunk":"@@ -134,6 +134,10 @@ void _native_syscall_leave(void)\n     }\n }\n \n+/* make use of TLSF if it is included, except when building with valgrind\n+ * support, where one probably wants to make use of valgrind's memory leak\n+ * detection abilities*/\n+#if !(defined MODULE_TLSF) || (defined(HAVE_VALGRIND_H))","path":"cpu/native/syscalls.c","position":7,"original_position":7,"commit_id":"6d135d35799bc028792fd9d94bf904b00e6b8899","original_commit_id":"6d135d35799bc028792fd9d94bf904b00e6b8899","user":{"login":"Kijewski","id":136776,"avatar_url":"https://avatars.githubusercontent.com/u/136776?v=3","gravatar_id":"","url":"https://api.github.com/users/Kijewski","html_url":"https://github.com/Kijewski","followers_url":"https://api.github.com/users/Kijewski/followers","following_url":"https://api.github.com/users/Kijewski/following{/other_user}","gists_url":"https://api.github.com/users/Kijewski/gists{/gist_id}","starred_url":"https://api.github.com/users/Kijewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kijewski/subscriptions","organizations_url":"https://api.github.com/users/Kijewski/orgs","repos_url":"https://api.github.com/users/Kijewski/repos","events_url":"https://api.github.com/users/Kijewski/events{/privacy}","received_events_url":"https://api.github.com/users/Kijewski/received_events","type":"User","site_admin":false},"body":"To me it looks like `free` needs exactly the same guard (and all other related functions as well: realloc, calloc, memallign). Otherwise TLSF pointer will be freed by glib, which should fail violently.","created_at":"2016-01-04T16:39:47Z","updated_at":"2016-01-04T16:39:47Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/4503#discussion_r48750150","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/48750150"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/4503#discussion_r48750150"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503"}}},"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503","id":54096023,"html_url":"https://github.com/RIOT-OS/RIOT/pull/4503","diff_url":"https://github.com/RIOT-OS/RIOT/pull/4503.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/4503.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4503","number":4503,"state":"open","locked":false,"title":"native: make use of TLSF malloc and co","user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"body":"In order to make native behave more similar to other platforms, it should also use TLSF's dynamic memory allocation if included. It will still fall back to the system's malloc implementation when building for use with valgrind, to leverage its memory leak detection mechanisms.","created_at":"2015-12-18T12:11:51Z","updated_at":"2016-01-04T16:39:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fad30ea1ad56a49fd4c20c335b577f9161fe4841","assignee":{"login":"LudwigKnuepfer","id":3739173,"avatar_url":"https://avatars.githubusercontent.com/u/3739173?v=3","gravatar_id":"","url":"https://api.github.com/users/LudwigKnuepfer","html_url":"https://github.com/LudwigKnuepfer","followers_url":"https://api.github.com/users/LudwigKnuepfer/followers","following_url":"https://api.github.com/users/LudwigKnuepfer/following{/other_user}","gists_url":"https://api.github.com/users/LudwigKnuepfer/gists{/gist_id}","starred_url":"https://api.github.com/users/LudwigKnuepfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LudwigKnuepfer/subscriptions","organizations_url":"https://api.github.com/users/LudwigKnuepfer/orgs","repos_url":"https://api.github.com/users/LudwigKnuepfer/repos","events_url":"https://api.github.com/users/LudwigKnuepfer/events{/privacy}","received_events_url":"https://api.github.com/users/LudwigKnuepfer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/13","html_url":"https://github.com/RIOT-OS/RIOT/milestones/Release%202016.03","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/13/labels","id":1447832,"number":13,"title":"Release 2016.03","description":"The next major release.","creator":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"open_issues":210,"closed_issues":12,"state":"open","created_at":"2015-12-07T14:56:18Z","updated_at":"2015-12-29T20:07:06Z","due_on":"2016-03-17T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503/comments","review_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4503/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/6d135d35799bc028792fd9d94bf904b00e6b8899","head":{"label":"OlegHahm:make_native_use_tlsf","ref":"make_native_use_tlsf","sha":"6d135d35799bc028792fd9d94bf904b00e6b8899","user":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"repo":{"id":10973192,"name":"RIOT","full_name":"OlegHahm/RIOT","owner":{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OlegHahm/RIOT","description":"RIOT OS -  The rambling OS for the IoT","fork":true,"url":"https://api.github.com/repos/OlegHahm/RIOT","forks_url":"https://api.github.com/repos/OlegHahm/RIOT/forks","keys_url":"https://api.github.com/repos/OlegHahm/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OlegHahm/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OlegHahm/RIOT/teams","hooks_url":"https://api.github.com/repos/OlegHahm/RIOT/hooks","issue_events_url":"https://api.github.com/repos/OlegHahm/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/OlegHahm/RIOT/events","assignees_url":"https://api.github.com/repos/OlegHahm/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/OlegHahm/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/OlegHahm/RIOT/tags","blobs_url":"https://api.github.com/repos/OlegHahm/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OlegHahm/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OlegHahm/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/OlegHahm/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OlegHahm/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/OlegHahm/RIOT/languages","stargazers_url":"https://api.github.com/repos/OlegHahm/RIOT/stargazers","contributors_url":"https://api.github.com/repos/OlegHahm/RIOT/contributors","subscribers_url":"https://api.github.com/repos/OlegHahm/RIOT/subscribers","subscription_url":"https://api.github.com/repos/OlegHahm/RIOT/subscription","commits_url":"https://api.github.com/repos/OlegHahm/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/OlegHahm/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/OlegHahm/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/OlegHahm/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/OlegHahm/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/OlegHahm/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OlegHahm/RIOT/merges","archive_url":"https://api.github.com/repos/OlegHahm/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OlegHahm/RIOT/downloads","issues_url":"https://api.github.com/repos/OlegHahm/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/OlegHahm/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/OlegHahm/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/OlegHahm/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OlegHahm/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/OlegHahm/RIOT/releases{/id}","created_at":"2013-06-26T16:32:09Z","updated_at":"2015-11-19T16:05:05Z","pushed_at":"2016-01-03T19:53:23Z","git_url":"git://github.com/OlegHahm/RIOT.git","ssh_url":"git@github.com:OlegHahm/RIOT.git","clone_url":"https://github.com/OlegHahm/RIOT.git","svn_url":"https://github.com/OlegHahm/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":26132,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"RIOT-OS:master","ref":"master","sha":"36923341f03dda81e1ff88c3262884b1fdc53780","user":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"repo":{"id":7370241,"name":"RIOT","full_name":"RIOT-OS/RIOT","owner":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIOT-OS/RIOT","description":"RIOT -  The friendly OS for IoT","fork":false,"url":"https://api.github.com/repos/RIOT-OS/RIOT","forks_url":"https://api.github.com/repos/RIOT-OS/RIOT/forks","keys_url":"https://api.github.com/repos/RIOT-OS/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIOT-OS/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIOT-OS/RIOT/teams","hooks_url":"https://api.github.com/repos/RIOT-OS/RIOT/hooks","issue_events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/events","assignees_url":"https://api.github.com/repos/RIOT-OS/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/RIOT-OS/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/tags","blobs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/RIOT-OS/RIOT/languages","stargazers_url":"https://api.github.com/repos/RIOT-OS/RIOT/stargazers","contributors_url":"https://api.github.com/repos/RIOT-OS/RIOT/contributors","subscribers_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscribers","subscription_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscription","commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIOT-OS/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/RIOT-OS/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIOT-OS/RIOT/merges","archive_url":"https://api.github.com/repos/RIOT-OS/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIOT-OS/RIOT/downloads","issues_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/RIOT-OS/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/RIOT-OS/RIOT/releases{/id}","created_at":"2012-12-29T20:38:40Z","updated_at":"2016-01-04T14:42:53Z","pushed_at":"2016-01-04T16:17:24Z","git_url":"git://github.com/RIOT-OS/RIOT.git","ssh_url":"git@github.com:RIOT-OS/RIOT.git","clone_url":"https://github.com/RIOT-OS/RIOT.git","svn_url":"https://github.com/RIOT-OS/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":79886,"stargazers_count":601,"watchers_count":601,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":460,"mirror_url":null,"open_issues_count":445,"forks":460,"open_issues":445,"watchers":601,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/4503"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4503"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/4503/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503/comments"},"review_comment":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/4503/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/6d135d35799bc028792fd9d94bf904b00e6b8899"}}}}