{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/75045461","id":75045461,"diff_hunk":"@@ -34434,8 +34442,11 @@ GCHeap::AllocAlign8Common(void* _hp, alloc_context* acontext, size_t size, uint3\n     AllocCount++;\n #endif //TRACE_GC\n     return newAlloc;\n-}\n+#else\n+    assert(!\"Should not call GCHeap::AllocAlign8Common without FEATURE_64BIT_ALIGNMENT defined!\");\n+    return false;","path":"src/gc/gc.cpp","position":428,"original_position":93,"commit_id":"fdb8b8db54c4706928ea4cf2660a2f9e1f4f0b76","original_commit_id":"fdb8b8db54c4706928ea4cf2660a2f9e1f4f0b76","user":{"login":"swgillespie","id":1871912,"avatar_url":"https://avatars.githubusercontent.com/u/1871912?v=3","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false},"body":"fixed, thanks!","created_at":"2016-08-17T00:29:20Z","updated_at":"2016-08-17T00:29:20Z","html_url":"https://github.com/dotnet/coreclr/pull/6764#discussion_r75045461","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/6764","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/75045461"},"html":{"href":"https://github.com/dotnet/coreclr/pull/6764#discussion_r75045461"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6764"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/6764","id":81556675,"html_url":"https://github.com/dotnet/coreclr/pull/6764","diff_url":"https://github.com/dotnet/coreclr/pull/6764.diff","patch_url":"https://github.com/dotnet/coreclr/pull/6764.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/6764","number":6764,"state":"open","locked":false,"title":"[WIP 2] Move the GC behind an interface and use that interface in the VM","user":{"login":"swgillespie","id":1871912,"avatar_url":"https://avatars.githubusercontent.com/u/1871912?v=3","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false},"body":"This PR is an extension of my first one (https://github.com/dotnet/coreclr/pull/6693), done as a separate PR because the commits are structured differently to make the change more reviewable, since there are a large number of trivial changes together with non-trivial ones. Force-pushing to the other PR would probably obliterate all of the existing comments.\r\n\r\nFirst, a note about reviewing: this PR consists of sixcommits. The first (`fefd452`) and fourth (`b5f8699`) are commits that do little more than renaming, so they are less interesting to review than the second, third, and fifth commits. The second commit is the introduction of `IGCHeap` and the required changes to the GC to make it compile, while the third commit is the movement of the responsibility of maintaining the global heap instance to the VM (more on that below). The fifth commit groups the interface functions into categories and documents them. I can also split these commits into individual PRs if it proves to be too much of a pain to code review.\r\n\r\nThe changes presented here are quite similar to the last PR, except it addresses the feedback received:\r\n\r\n* The `GCHeap` class was renamed to `IGCHeapInternal` and made to be a mostly* pure virtual class. The inheritance tree of the `GCHeaps` now looks like\r\n\r\n```\r\nIGCHeap\r\n|\r\n+-- ::IGCHeapInternal\r\n        |\r\n        +-- SVR::GCHeap\r\n        |\r\n        +-- WKS::GCHeap\r\n```\r\n\r\n`IGCHeapInternal` is an internal-only interface that the GC will use to call into itself and is a superset of the functionality exposed by `IGCHeap`. As a part of this change, all of the static methods on both `IGCHeap` and `IGCHeapInternal` were eliminated and replaced by free functions when appropriate.\r\n\r\n(* I say \"mostly\" pure virtual because it overrides a few methods present on `IGCHeap`, because the implementation is the same across `SVR::GCHeap` and `WKS::GCHeap`.)\r\n\r\n* The VM is now responsible for creating and maintaining the global heap instance. This means that `g_pGCHeap`, which has traditionally resided on the GC side of the interface, will be located in the VM instead (`src\\vm\\gcholder.cpp`). As a part of this change, the VM calls `InitializeGarbageCollector` on EE startup and [saves the return value](https://github.com/swgillespie/coreclr/blob/gc-interface-3/src/vm/ceemain.cpp#L3722) that it gets from it into `g_pGCHeap`. Inside `InitializeGarbageCollector`, the GC itself saves that same pointer into `g_theGcHeap`. In this way, each component can operate on the heap independently of the other without having to ask other components for a reference to the GC heap, as was done in the past with `GCHeap::GetGCHeap()`.\r\n* Static methods on `IGCHeap` were moved to a VM-only class [`GCHeapHolder`](https://github.com/swgillespie/coreclr/blob/gc-interface-3/src/vm/gcholder.h#L16), which \"wraps\" the global heap instance. This ensures that there are no static methods on the interface itself, keeping the interface a pure virtual class.\r\n","created_at":"2016-08-16T22:36:28Z","updated_at":"2016-08-17T00:29:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b8462a3c6fa5d6d2e21066c1b0f0766106973a7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/6764/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/6764/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/6764/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/fdb8b8db54c4706928ea4cf2660a2f9e1f4f0b76","head":{"label":"swgillespie:gc-interface-3","ref":"gc-interface-3","sha":"fdb8b8db54c4706928ea4cf2660a2f9e1f4f0b76","user":{"login":"swgillespie","id":1871912,"avatar_url":"https://avatars.githubusercontent.com/u/1871912?v=3","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false},"repo":{"id":47656398,"name":"coreclr","full_name":"swgillespie/coreclr","owner":{"login":"swgillespie","id":1871912,"avatar_url":"https://avatars.githubusercontent.com/u/1871912?v=3","gravatar_id":"","url":"https://api.github.com/users/swgillespie","html_url":"https://github.com/swgillespie","followers_url":"https://api.github.com/users/swgillespie/followers","following_url":"https://api.github.com/users/swgillespie/following{/other_user}","gists_url":"https://api.github.com/users/swgillespie/gists{/gist_id}","starred_url":"https://api.github.com/users/swgillespie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swgillespie/subscriptions","organizations_url":"https://api.github.com/users/swgillespie/orgs","repos_url":"https://api.github.com/users/swgillespie/repos","events_url":"https://api.github.com/users/swgillespie/events{/privacy}","received_events_url":"https://api.github.com/users/swgillespie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/swgillespie/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":true,"url":"https://api.github.com/repos/swgillespie/coreclr","forks_url":"https://api.github.com/repos/swgillespie/coreclr/forks","keys_url":"https://api.github.com/repos/swgillespie/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swgillespie/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swgillespie/coreclr/teams","hooks_url":"https://api.github.com/repos/swgillespie/coreclr/hooks","issue_events_url":"https://api.github.com/repos/swgillespie/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/swgillespie/coreclr/events","assignees_url":"https://api.github.com/repos/swgillespie/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/swgillespie/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/swgillespie/coreclr/tags","blobs_url":"https://api.github.com/repos/swgillespie/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swgillespie/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swgillespie/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/swgillespie/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swgillespie/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/swgillespie/coreclr/languages","stargazers_url":"https://api.github.com/repos/swgillespie/coreclr/stargazers","contributors_url":"https://api.github.com/repos/swgillespie/coreclr/contributors","subscribers_url":"https://api.github.com/repos/swgillespie/coreclr/subscribers","subscription_url":"https://api.github.com/repos/swgillespie/coreclr/subscription","commits_url":"https://api.github.com/repos/swgillespie/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/swgillespie/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/swgillespie/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/swgillespie/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/swgillespie/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/swgillespie/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swgillespie/coreclr/merges","archive_url":"https://api.github.com/repos/swgillespie/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swgillespie/coreclr/downloads","issues_url":"https://api.github.com/repos/swgillespie/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/swgillespie/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/swgillespie/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/swgillespie/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swgillespie/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/swgillespie/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/swgillespie/coreclr/deployments","created_at":"2015-12-08T23:40:42Z","updated_at":"2016-01-13T23:23:53Z","pushed_at":"2016-08-17T00:23:32Z","git_url":"git://github.com/swgillespie/coreclr.git","ssh_url":"git@github.com:swgillespie/coreclr.git","clone_url":"https://github.com/swgillespie/coreclr.git","svn_url":"https://github.com/swgillespie/coreclr","homepage":"http://dotnet.github.io/","size":103173,"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":"dotnet:master","ref":"master","sha":"68f3852c6b39f8a64b06739e7f7c932796cf2407","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2016-08-16T14:21:38Z","pushed_at":"2016-08-17T00:28:18Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"https://docs.microsoft.com/dotnet/","size":115539,"stargazers_count":6781,"watchers_count":6781,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1601,"mirror_url":null,"open_issues_count":937,"forks":1601,"open_issues":937,"watchers":6781,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6764"},"html":{"href":"https://github.com/dotnet/coreclr/pull/6764"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/6764"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/6764/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6764/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/6764/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/fdb8b8db54c4706928ea4cf2660a2f9e1f4f0b76"}}}}
{"actor":{"display_login":"swgillespie"}}