{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments/65920494","id":65920494,"diff_hunk":"@@ -0,0 +1,176 @@\n+/*\n+ * Copyright (c) 2016, ARM Limited, All Rights Reserved\n+ * SPDX-License-Identifier: Apache-2.0\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+#include <stdint.h>\n+#include <stddef.h>\n+#include <stdio.h>\n+#include <reent.h>\n+\n+#include \"uvisor-lib/uvisor-lib.h\"\n+#include \"cmsis_os.h\"\n+\n+#define DPRINTF(...) {};\n+/* Use printf with caution inside malloc: printf may allocate memory itself,\n+   so using printf in malloc may lead to recursive calls! */\n+/* #define DPRINTF(fmt, ...) printf(fmt, ## __VA_ARGS__) */\n+\n+/* Declare this variable here, so uVisor initializes enough space for the\n+ * mutexes, which are used in this file! */\n+const uint32_t __uvisor_box_index_size = sizeof(RtxBoxIndex);\n+\n+extern RtxBoxIndex *const __uvisor_ps;","path":"api/rtx/src/uvisor_malloc.c","position":35,"original_position":34,"commit_id":"bd775c5d616a361bb1b140747ced3982361e44a0","original_commit_id":"19542cf0ec4ee6fbb34183c63c6590d12f5ec85e","user":{"login":"AlessandroA","id":8617445,"avatar_url":"https://avatars.githubusercontent.com/u/8617445?v=3","gravatar_id":"","url":"https://api.github.com/users/AlessandroA","html_url":"https://github.com/AlessandroA","followers_url":"https://api.github.com/users/AlessandroA/followers","following_url":"https://api.github.com/users/AlessandroA/following{/other_user}","gists_url":"https://api.github.com/users/AlessandroA/gists{/gist_id}","starred_url":"https://api.github.com/users/AlessandroA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlessandroA/subscriptions","organizations_url":"https://api.github.com/users/AlessandroA/orgs","repos_url":"https://api.github.com/users/AlessandroA/repos","events_url":"https://api.github.com/users/AlessandroA/events{/privacy}","received_events_url":"https://api.github.com/users/AlessandroA/received_events","type":"User","site_admin":false},"body":"`* const`","created_at":"2016-06-06T16:16:56Z","updated_at":"2016-06-06T16:16:56Z","html_url":"https://github.com/ARMmbed/uvisor/pull/231#discussion_r65920494","pull_request_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments/65920494"},"html":{"href":"https://github.com/ARMmbed/uvisor/pull/231#discussion_r65920494"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231","id":72017346,"html_url":"https://github.com/ARMmbed/uvisor/pull/231","diff_url":"https://github.com/ARMmbed/uvisor/pull/231.diff","patch_url":"https://github.com/ARMmbed/uvisor/pull/231.patch","issue_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/231","number":231,"state":"open","locked":false,"title":"3. Add tier-2 allocator and initialization","user":{"login":"niklas-arm","id":15176141,"avatar_url":"https://avatars.githubusercontent.com/u/15176141?v=3","gravatar_id":"","url":"https://api.github.com/users/niklas-arm","html_url":"https://github.com/niklas-arm","followers_url":"https://api.github.com/users/niklas-arm/followers","following_url":"https://api.github.com/users/niklas-arm/following{/other_user}","gists_url":"https://api.github.com/users/niklas-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/niklas-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklas-arm/subscriptions","organizations_url":"https://api.github.com/users/niklas-arm/orgs","repos_url":"https://api.github.com/users/niklas-arm/repos","events_url":"https://api.github.com/users/niklas-arm/events{/privacy}","received_events_url":"https://api.github.com/users/niklas-arm/received_events","type":"User","site_admin":false},"body":"This adds the required glue code for connecting the tier-2 with the tier-1 allocator incl. initialization of heaps on first allocation.\r\nAlso adds mutex protection to process heap via extended box index.\r\n\r\nNote: This builds directly on top of #230 and depends on it!\r\n\r\ncc @Patater @AlessandroA @meriac","created_at":"2016-05-31T13:41:08Z","updated_at":"2016-06-06T16:16:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c42d459c76116bb7f80d2d00b17ce02f791b466","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/231/comments","statuses_url":"https://api.github.com/repos/ARMmbed/uvisor/statuses/bd775c5d616a361bb1b140747ced3982361e44a0","head":{"label":"niklas-arm:feature/tier-2-allocator","ref":"feature/tier-2-allocator","sha":"bd775c5d616a361bb1b140747ced3982361e44a0","user":{"login":"niklas-arm","id":15176141,"avatar_url":"https://avatars.githubusercontent.com/u/15176141?v=3","gravatar_id":"","url":"https://api.github.com/users/niklas-arm","html_url":"https://github.com/niklas-arm","followers_url":"https://api.github.com/users/niklas-arm/followers","following_url":"https://api.github.com/users/niklas-arm/following{/other_user}","gists_url":"https://api.github.com/users/niklas-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/niklas-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklas-arm/subscriptions","organizations_url":"https://api.github.com/users/niklas-arm/orgs","repos_url":"https://api.github.com/users/niklas-arm/repos","events_url":"https://api.github.com/users/niklas-arm/events{/privacy}","received_events_url":"https://api.github.com/users/niklas-arm/received_events","type":"User","site_admin":false},"repo":{"id":56140266,"name":"uvisor","full_name":"niklas-arm/uvisor","owner":{"login":"niklas-arm","id":15176141,"avatar_url":"https://avatars.githubusercontent.com/u/15176141?v=3","gravatar_id":"","url":"https://api.github.com/users/niklas-arm","html_url":"https://github.com/niklas-arm","followers_url":"https://api.github.com/users/niklas-arm/followers","following_url":"https://api.github.com/users/niklas-arm/following{/other_user}","gists_url":"https://api.github.com/users/niklas-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/niklas-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklas-arm/subscriptions","organizations_url":"https://api.github.com/users/niklas-arm/orgs","repos_url":"https://api.github.com/users/niklas-arm/repos","events_url":"https://api.github.com/users/niklas-arm/events{/privacy}","received_events_url":"https://api.github.com/users/niklas-arm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niklas-arm/uvisor","description":"mbed OS uVisor -- device security layer for ARMv7M microcontrollers","fork":true,"url":"https://api.github.com/repos/niklas-arm/uvisor","forks_url":"https://api.github.com/repos/niklas-arm/uvisor/forks","keys_url":"https://api.github.com/repos/niklas-arm/uvisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niklas-arm/uvisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niklas-arm/uvisor/teams","hooks_url":"https://api.github.com/repos/niklas-arm/uvisor/hooks","issue_events_url":"https://api.github.com/repos/niklas-arm/uvisor/issues/events{/number}","events_url":"https://api.github.com/repos/niklas-arm/uvisor/events","assignees_url":"https://api.github.com/repos/niklas-arm/uvisor/assignees{/user}","branches_url":"https://api.github.com/repos/niklas-arm/uvisor/branches{/branch}","tags_url":"https://api.github.com/repos/niklas-arm/uvisor/tags","blobs_url":"https://api.github.com/repos/niklas-arm/uvisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niklas-arm/uvisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niklas-arm/uvisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/niklas-arm/uvisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niklas-arm/uvisor/statuses/{sha}","languages_url":"https://api.github.com/repos/niklas-arm/uvisor/languages","stargazers_url":"https://api.github.com/repos/niklas-arm/uvisor/stargazers","contributors_url":"https://api.github.com/repos/niklas-arm/uvisor/contributors","subscribers_url":"https://api.github.com/repos/niklas-arm/uvisor/subscribers","subscription_url":"https://api.github.com/repos/niklas-arm/uvisor/subscription","commits_url":"https://api.github.com/repos/niklas-arm/uvisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/niklas-arm/uvisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/niklas-arm/uvisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/niklas-arm/uvisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/niklas-arm/uvisor/contents/{+path}","compare_url":"https://api.github.com/repos/niklas-arm/uvisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niklas-arm/uvisor/merges","archive_url":"https://api.github.com/repos/niklas-arm/uvisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niklas-arm/uvisor/downloads","issues_url":"https://api.github.com/repos/niklas-arm/uvisor/issues{/number}","pulls_url":"https://api.github.com/repos/niklas-arm/uvisor/pulls{/number}","milestones_url":"https://api.github.com/repos/niklas-arm/uvisor/milestones{/number}","notifications_url":"https://api.github.com/repos/niklas-arm/uvisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niklas-arm/uvisor/labels{/name}","releases_url":"https://api.github.com/repos/niklas-arm/uvisor/releases{/id}","deployments_url":"https://api.github.com/repos/niklas-arm/uvisor/deployments","created_at":"2016-04-13T09:50:01Z","updated_at":"2016-04-13T09:50:02Z","pushed_at":"2016-06-06T14:44:10Z","git_url":"git://github.com/niklas-arm/uvisor.git","ssh_url":"git@github.com:niklas-arm/uvisor.git","clone_url":"https://github.com/niklas-arm/uvisor.git","svn_url":"https://github.com/niklas-arm/uvisor","homepage":"","size":5204,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARMmbed:dev","ref":"dev","sha":"f4cfcae2c600dce39955cbfad9dd6c84095f4739","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":27869517,"name":"uvisor","full_name":"ARMmbed/uvisor","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/uvisor","description":"mbed OS uVisor -- device security layer for ARMv7M microcontrollers","fork":false,"url":"https://api.github.com/repos/ARMmbed/uvisor","forks_url":"https://api.github.com/repos/ARMmbed/uvisor/forks","keys_url":"https://api.github.com/repos/ARMmbed/uvisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/uvisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/uvisor/teams","hooks_url":"https://api.github.com/repos/ARMmbed/uvisor/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/uvisor/events","assignees_url":"https://api.github.com/repos/ARMmbed/uvisor/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/uvisor/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/uvisor/tags","blobs_url":"https://api.github.com/repos/ARMmbed/uvisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/uvisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/uvisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/uvisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/uvisor/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/uvisor/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/uvisor/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/uvisor/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/uvisor/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/uvisor/subscription","commits_url":"https://api.github.com/repos/ARMmbed/uvisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/uvisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/uvisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/uvisor/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/uvisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/uvisor/merges","archive_url":"https://api.github.com/repos/ARMmbed/uvisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/uvisor/downloads","issues_url":"https://api.github.com/repos/ARMmbed/uvisor/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/uvisor/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/uvisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/uvisor/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/uvisor/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/uvisor/deployments","created_at":"2014-12-11T11:59:50Z","updated_at":"2016-06-04T08:33:24Z","pushed_at":"2016-06-06T14:44:11Z","git_url":"git://github.com/ARMmbed/uvisor.git","ssh_url":"git@github.com:ARMmbed/uvisor.git","clone_url":"https://github.com/ARMmbed/uvisor.git","svn_url":"https://github.com/ARMmbed/uvisor","homepage":"","size":6430,"stargazers_count":58,"watchers_count":58,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":29,"forks":32,"open_issues":29,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231"},"html":{"href":"https://github.com/ARMmbed/uvisor/pull/231"},"issue":{"href":"https://api.github.com/repos/ARMmbed/uvisor/issues/231"},"comments":{"href":"https://api.github.com/repos/ARMmbed/uvisor/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/uvisor/statuses/bd775c5d616a361bb1b140747ced3982361e44a0"}}}}
{"actor":{"display_login":"AlessandroA"}}