{"action":"created","comment":{"url":"https://api.github.com/repos/ponylang/ponyc/pulls/comments/103964620","pull_request_review_id":24774252,"id":103964620,"diff_hunk":"@@ -119,17 +117,18 @@ namespace ponyint_atomics\n namespace ponyint_atomics\n {\n   template <typename T>\n-  inline PONY_ABA_PROTECTED(T) big_load(PONY_ABA_PROTECTED(T)* ptr)\n+  inline PONY_ABA_PROTECTED_PTR(T) big_load(PONY_ABA_PROTECTED_PTR(T)* ptr)\n   {\n-    PONY_ABA_PROTECTED(T) ret = {NULL, 0};\n+    PONY_ABA_PROTECTED_PTR(T) ret = {NULL, 0};","path":"src/common/pony/detail/atomics.h","position":62,"original_position":57,"commit_id":"d6ef8768c885506f514846e65f799fe9cd42cb36","original_commit_id":"fb96089553de2d78494037ecd1360cae273d9ccf","user":{"login":"Praetonus","id":5193706,"avatar_url":"https://avatars2.githubusercontent.com/u/5193706?v=3","gravatar_id":"","url":"https://api.github.com/users/Praetonus","html_url":"https://github.com/Praetonus","followers_url":"https://api.github.com/users/Praetonus/followers","following_url":"https://api.github.com/users/Praetonus/following{/other_user}","gists_url":"https://api.github.com/users/Praetonus/gists{/gist_id}","starred_url":"https://api.github.com/users/Praetonus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praetonus/subscriptions","organizations_url":"https://api.github.com/users/Praetonus/orgs","repos_url":"https://api.github.com/users/Praetonus/repos","events_url":"https://api.github.com/users/Praetonus/events{/privacy}","received_events_url":"https://api.github.com/users/Praetonus/received_events","type":"User","site_admin":false},"body":"It turns out it is also possible in `pool_block_push/pull` but with an additional branching to avoid the CAS when we don't need it. Would that be an interesting tradeoff?","created_at":"2017-03-02T16:22:21Z","updated_at":"2017-03-02T16:22:21Z","html_url":"https://github.com/ponylang/ponyc/pull/1621#discussion_r103964620","pull_request_url":"https://api.github.com/repos/ponylang/ponyc/pulls/1621","_links":{"self":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/comments/103964620"},"html":{"href":"https://github.com/ponylang/ponyc/pull/1621#discussion_r103964620"},"pull_request":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/1621"}}},"pull_request":{"url":"https://api.github.com/repos/ponylang/ponyc/pulls/1621","id":108710713,"html_url":"https://github.com/ponylang/ponyc/pull/1621","diff_url":"https://github.com/ponylang/ponyc/pull/1621.diff","patch_url":"https://github.com/ponylang/ponyc/pull/1621.patch","issue_url":"https://api.github.com/repos/ponylang/ponyc/issues/1621","number":1621,"state":"open","locked":false,"title":"Push local pool memory to a global list at thread termination","user":{"login":"Praetonus","id":5193706,"avatar_url":"https://avatars2.githubusercontent.com/u/5193706?v=3","gravatar_id":"","url":"https://api.github.com/users/Praetonus","html_url":"https://github.com/Praetonus","followers_url":"https://api.github.com/users/Praetonus/followers","following_url":"https://api.github.com/users/Praetonus/following{/other_user}","gists_url":"https://api.github.com/users/Praetonus/gists{/gist_id}","starred_url":"https://api.github.com/users/Praetonus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praetonus/subscriptions","organizations_url":"https://api.github.com/users/Praetonus/orgs","repos_url":"https://api.github.com/users/Praetonus/repos","events_url":"https://api.github.com/users/Praetonus/events{/privacy}","received_events_url":"https://api.github.com/users/Praetonus/received_events","type":"User","site_admin":false},"body":"This change adds a global list of free blocks to the pool allocator, similar to the existing global list of free lists. When a runtime thread terminates, it will push its local free blocks to the global list, which can then be retreived by other threads.\r\n\r\nThe goal of this change is to avoid memory leaks when starting and stopping the runtime multiple times in a program, for example in the compiler test suite.\r\n\r\nThis pool allocator cleanup functionnality is exposed to user threads through the new `pony_unregister_thread` function.\r\n\r\nPS: I expect that this change will introduce a performance penalty to the runtime termination, especially for long-running programs with lots of memory in free lists. I haven't done any real measurements so I don't have a precise estimate for this slowdown. If that's an issue I can modify the patch to add a runtime option for pool cleanup.","created_at":"2017-03-02T08:40:10Z","updated_at":"2017-03-02T16:22:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39102ad065e699171101d4b7b449526a4d518e97","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ponylang/ponyc/pulls/1621/commits","review_comments_url":"https://api.github.com/repos/ponylang/ponyc/pulls/1621/comments","review_comment_url":"https://api.github.com/repos/ponylang/ponyc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ponylang/ponyc/issues/1621/comments","statuses_url":"https://api.github.com/repos/ponylang/ponyc/statuses/d6ef8768c885506f514846e65f799fe9cd42cb36","head":{"label":"Praetonus:pool-cleanup-block","ref":"pool-cleanup-block","sha":"d6ef8768c885506f514846e65f799fe9cd42cb36","user":{"login":"Praetonus","id":5193706,"avatar_url":"https://avatars2.githubusercontent.com/u/5193706?v=3","gravatar_id":"","url":"https://api.github.com/users/Praetonus","html_url":"https://github.com/Praetonus","followers_url":"https://api.github.com/users/Praetonus/followers","following_url":"https://api.github.com/users/Praetonus/following{/other_user}","gists_url":"https://api.github.com/users/Praetonus/gists{/gist_id}","starred_url":"https://api.github.com/users/Praetonus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praetonus/subscriptions","organizations_url":"https://api.github.com/users/Praetonus/orgs","repos_url":"https://api.github.com/users/Praetonus/repos","events_url":"https://api.github.com/users/Praetonus/events{/privacy}","received_events_url":"https://api.github.com/users/Praetonus/received_events","type":"User","site_admin":false},"repo":{"id":45713217,"name":"ponyc","full_name":"Praetonus/ponyc","owner":{"login":"Praetonus","id":5193706,"avatar_url":"https://avatars2.githubusercontent.com/u/5193706?v=3","gravatar_id":"","url":"https://api.github.com/users/Praetonus","html_url":"https://github.com/Praetonus","followers_url":"https://api.github.com/users/Praetonus/followers","following_url":"https://api.github.com/users/Praetonus/following{/other_user}","gists_url":"https://api.github.com/users/Praetonus/gists{/gist_id}","starred_url":"https://api.github.com/users/Praetonus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Praetonus/subscriptions","organizations_url":"https://api.github.com/users/Praetonus/orgs","repos_url":"https://api.github.com/users/Praetonus/repos","events_url":"https://api.github.com/users/Praetonus/events{/privacy}","received_events_url":"https://api.github.com/users/Praetonus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Praetonus/ponyc","description":"Pony Compiler","fork":true,"url":"https://api.github.com/repos/Praetonus/ponyc","forks_url":"https://api.github.com/repos/Praetonus/ponyc/forks","keys_url":"https://api.github.com/repos/Praetonus/ponyc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Praetonus/ponyc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Praetonus/ponyc/teams","hooks_url":"https://api.github.com/repos/Praetonus/ponyc/hooks","issue_events_url":"https://api.github.com/repos/Praetonus/ponyc/issues/events{/number}","events_url":"https://api.github.com/repos/Praetonus/ponyc/events","assignees_url":"https://api.github.com/repos/Praetonus/ponyc/assignees{/user}","branches_url":"https://api.github.com/repos/Praetonus/ponyc/branches{/branch}","tags_url":"https://api.github.com/repos/Praetonus/ponyc/tags","blobs_url":"https://api.github.com/repos/Praetonus/ponyc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Praetonus/ponyc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Praetonus/ponyc/git/refs{/sha}","trees_url":"https://api.github.com/repos/Praetonus/ponyc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Praetonus/ponyc/statuses/{sha}","languages_url":"https://api.github.com/repos/Praetonus/ponyc/languages","stargazers_url":"https://api.github.com/repos/Praetonus/ponyc/stargazers","contributors_url":"https://api.github.com/repos/Praetonus/ponyc/contributors","subscribers_url":"https://api.github.com/repos/Praetonus/ponyc/subscribers","subscription_url":"https://api.github.com/repos/Praetonus/ponyc/subscription","commits_url":"https://api.github.com/repos/Praetonus/ponyc/commits{/sha}","git_commits_url":"https://api.github.com/repos/Praetonus/ponyc/git/commits{/sha}","comments_url":"https://api.github.com/repos/Praetonus/ponyc/comments{/number}","issue_comment_url":"https://api.github.com/repos/Praetonus/ponyc/issues/comments{/number}","contents_url":"https://api.github.com/repos/Praetonus/ponyc/contents/{+path}","compare_url":"https://api.github.com/repos/Praetonus/ponyc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Praetonus/ponyc/merges","archive_url":"https://api.github.com/repos/Praetonus/ponyc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Praetonus/ponyc/downloads","issues_url":"https://api.github.com/repos/Praetonus/ponyc/issues{/number}","pulls_url":"https://api.github.com/repos/Praetonus/ponyc/pulls{/number}","milestones_url":"https://api.github.com/repos/Praetonus/ponyc/milestones{/number}","notifications_url":"https://api.github.com/repos/Praetonus/ponyc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Praetonus/ponyc/labels{/name}","releases_url":"https://api.github.com/repos/Praetonus/ponyc/releases{/id}","deployments_url":"https://api.github.com/repos/Praetonus/ponyc/deployments","created_at":"2015-11-06T23:11:45Z","updated_at":"2016-02-01T10:51:03Z","pushed_at":"2017-03-02T15:32:36Z","git_url":"git://github.com/Praetonus/ponyc.git","ssh_url":"git@github.com:Praetonus/ponyc.git","clone_url":"https://github.com/Praetonus/ponyc.git","svn_url":"https://github.com/Praetonus/ponyc","homepage":"http://www.ponylang.org","size":10209,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ponylang:master","ref":"master","sha":"a826260e276b0637361e019a992e5f266bf5a613","user":{"login":"ponylang","id":12997238,"avatar_url":"https://avatars3.githubusercontent.com/u/12997238?v=3","gravatar_id":"","url":"https://api.github.com/users/ponylang","html_url":"https://github.com/ponylang","followers_url":"https://api.github.com/users/ponylang/followers","following_url":"https://api.github.com/users/ponylang/following{/other_user}","gists_url":"https://api.github.com/users/ponylang/gists{/gist_id}","starred_url":"https://api.github.com/users/ponylang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ponylang/subscriptions","organizations_url":"https://api.github.com/users/ponylang/orgs","repos_url":"https://api.github.com/users/ponylang/repos","events_url":"https://api.github.com/users/ponylang/events{/privacy}","received_events_url":"https://api.github.com/users/ponylang/received_events","type":"Organization","site_admin":false},"repo":{"id":6667084,"name":"ponyc","full_name":"ponylang/ponyc","owner":{"login":"ponylang","id":12997238,"avatar_url":"https://avatars3.githubusercontent.com/u/12997238?v=3","gravatar_id":"","url":"https://api.github.com/users/ponylang","html_url":"https://github.com/ponylang","followers_url":"https://api.github.com/users/ponylang/followers","following_url":"https://api.github.com/users/ponylang/following{/other_user}","gists_url":"https://api.github.com/users/ponylang/gists{/gist_id}","starred_url":"https://api.github.com/users/ponylang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ponylang/subscriptions","organizations_url":"https://api.github.com/users/ponylang/orgs","repos_url":"https://api.github.com/users/ponylang/repos","events_url":"https://api.github.com/users/ponylang/events{/privacy}","received_events_url":"https://api.github.com/users/ponylang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ponylang/ponyc","description":"Pony is an open-source, actor-model, capabilities-secure, high performance programming language","fork":false,"url":"https://api.github.com/repos/ponylang/ponyc","forks_url":"https://api.github.com/repos/ponylang/ponyc/forks","keys_url":"https://api.github.com/repos/ponylang/ponyc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ponylang/ponyc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ponylang/ponyc/teams","hooks_url":"https://api.github.com/repos/ponylang/ponyc/hooks","issue_events_url":"https://api.github.com/repos/ponylang/ponyc/issues/events{/number}","events_url":"https://api.github.com/repos/ponylang/ponyc/events","assignees_url":"https://api.github.com/repos/ponylang/ponyc/assignees{/user}","branches_url":"https://api.github.com/repos/ponylang/ponyc/branches{/branch}","tags_url":"https://api.github.com/repos/ponylang/ponyc/tags","blobs_url":"https://api.github.com/repos/ponylang/ponyc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ponylang/ponyc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ponylang/ponyc/git/refs{/sha}","trees_url":"https://api.github.com/repos/ponylang/ponyc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ponylang/ponyc/statuses/{sha}","languages_url":"https://api.github.com/repos/ponylang/ponyc/languages","stargazers_url":"https://api.github.com/repos/ponylang/ponyc/stargazers","contributors_url":"https://api.github.com/repos/ponylang/ponyc/contributors","subscribers_url":"https://api.github.com/repos/ponylang/ponyc/subscribers","subscription_url":"https://api.github.com/repos/ponylang/ponyc/subscription","commits_url":"https://api.github.com/repos/ponylang/ponyc/commits{/sha}","git_commits_url":"https://api.github.com/repos/ponylang/ponyc/git/commits{/sha}","comments_url":"https://api.github.com/repos/ponylang/ponyc/comments{/number}","issue_comment_url":"https://api.github.com/repos/ponylang/ponyc/issues/comments{/number}","contents_url":"https://api.github.com/repos/ponylang/ponyc/contents/{+path}","compare_url":"https://api.github.com/repos/ponylang/ponyc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ponylang/ponyc/merges","archive_url":"https://api.github.com/repos/ponylang/ponyc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ponylang/ponyc/downloads","issues_url":"https://api.github.com/repos/ponylang/ponyc/issues{/number}","pulls_url":"https://api.github.com/repos/ponylang/ponyc/pulls{/number}","milestones_url":"https://api.github.com/repos/ponylang/ponyc/milestones{/number}","notifications_url":"https://api.github.com/repos/ponylang/ponyc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ponylang/ponyc/labels{/name}","releases_url":"https://api.github.com/repos/ponylang/ponyc/releases{/id}","deployments_url":"https://api.github.com/repos/ponylang/ponyc/deployments","created_at":"2012-11-13T07:38:25Z","updated_at":"2017-03-02T11:20:40Z","pushed_at":"2017-03-02T15:32:38Z","git_url":"git://github.com/ponylang/ponyc.git","ssh_url":"git@github.com:ponylang/ponyc.git","clone_url":"https://github.com/ponylang/ponyc.git","svn_url":"https://github.com/ponylang/ponyc","homepage":"http://www.ponylang.org","size":135689,"stargazers_count":2107,"watchers_count":2107,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":167,"mirror_url":null,"open_issues_count":110,"forks":167,"open_issues":110,"watchers":2107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/1621"},"html":{"href":"https://github.com/ponylang/ponyc/pull/1621"},"issue":{"href":"https://api.github.com/repos/ponylang/ponyc/issues/1621"},"comments":{"href":"https://api.github.com/repos/ponylang/ponyc/issues/1621/comments"},"review_comments":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/1621/comments"},"review_comment":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ponylang/ponyc/pulls/1621/commits"},"statuses":{"href":"https://api.github.com/repos/ponylang/ponyc/statuses/d6ef8768c885506f514846e65f799fe9cd42cb36"}}}}
{"actor":{"display_login":"Praetonus"}}