{"action":"created","comment":{"url":"https://api.github.com/repos/cuberite/cuberite/pulls/comments/60650782","id":60650782,"diff_hunk":"@@ -677,9 +691,9 @@ void cRoot::AuthenticateUser(int a_ClientID, const AString & a_Name, const AStri\n \n \n \n-int cRoot::GetTotalChunkCount(void)\n+size_t cRoot::GetTotalChunkCount(void)","path":"src/Root.cpp","position":33,"original_position":33,"commit_id":"b00fa3237dca34c64fd2131d0a95dd725004445e","original_commit_id":"b00fa3237dca34c64fd2131d0a95dd725004445e","user":{"login":"Seadragon91","id":14818618,"avatar_url":"https://avatars.githubusercontent.com/u/14818618?v=3","gravatar_id":"","url":"https://api.github.com/users/Seadragon91","html_url":"https://github.com/Seadragon91","followers_url":"https://api.github.com/users/Seadragon91/followers","following_url":"https://api.github.com/users/Seadragon91/following{/other_user}","gists_url":"https://api.github.com/users/Seadragon91/gists{/gist_id}","starred_url":"https://api.github.com/users/Seadragon91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seadragon91/subscriptions","organizations_url":"https://api.github.com/users/Seadragon91/orgs","repos_url":"https://api.github.com/users/Seadragon91/repos","events_url":"https://api.github.com/users/Seadragon91/events{/privacy}","received_events_url":"https://api.github.com/users/Seadragon91/received_events","type":"User","site_admin":false},"body":"This method is called in `WebAdmin.cpp:374`, changing the format type to `%zu`, fixes it.\r\n`Printf(NumChunks, \"%d\", cRoot::Get()->GetTotalChunkCount());`\r\n","created_at":"2016-04-21T20:35:20Z","updated_at":"2016-04-21T20:35:20Z","html_url":"https://github.com/cuberite/cuberite/pull/3151#discussion_r60650782","pull_request_url":"https://api.github.com/repos/cuberite/cuberite/pulls/3151","_links":{"self":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/comments/60650782"},"html":{"href":"https://github.com/cuberite/cuberite/pull/3151#discussion_r60650782"},"pull_request":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/3151"}}},"pull_request":{"url":"https://api.github.com/repos/cuberite/cuberite/pulls/3151","id":67050439,"html_url":"https://github.com/cuberite/cuberite/pull/3151","diff_url":"https://github.com/cuberite/cuberite/pull/3151.diff","patch_url":"https://github.com/cuberite/cuberite/pull/3151.patch","issue_url":"https://api.github.com/repos/cuberite/cuberite/issues/3151","number":3151,"state":"open","locked":false,"title":"Smart chunk unloading","user":{"login":"LogicParrot","id":5030488,"avatar_url":"https://avatars.githubusercontent.com/u/5030488?v=3","gravatar_id":"","url":"https://api.github.com/users/LogicParrot","html_url":"https://github.com/LogicParrot","followers_url":"https://api.github.com/users/LogicParrot/followers","following_url":"https://api.github.com/users/LogicParrot/following{/other_user}","gists_url":"https://api.github.com/users/LogicParrot/gists{/gist_id}","starred_url":"https://api.github.com/users/LogicParrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogicParrot/subscriptions","organizations_url":"https://api.github.com/users/LogicParrot/orgs","repos_url":"https://api.github.com/users/LogicParrot/repos","events_url":"https://api.github.com/users/LogicParrot/events{/privacy}","received_events_url":"https://api.github.com/users/LogicParrot/received_events","type":"User","site_admin":false},"body":"Work in progress. This is a smarter replacement for #3142\r\n\r\n>Unused RAM is lost RAM - @worktycho \r\n\r\n- The server has a \"max ram dedicated for chunks\" setting, configurable in settings.ini\r\n- Chunks are kept in RAM until that amount is exceeded.\r\n- If the maximum amount is exceeded, worlds will randomly pick chunk layers, and free non-dirty, non used chunks from them until the specified max amount is reached.\r\n- If freeing unused non-dirty chunks wasn't enough, some of the worlds may decide to save unused dirty chunks to disk and then free them.\r\n\r\nUpdate: Setting is now based on RAM, not on chunk count.","created_at":"2016-04-19T16:36:30Z","updated_at":"2016-04-21T20:35:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8e1792c4f5d9d2f0e95190e3567693290499d21","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cuberite/cuberite/pulls/3151/commits","review_comments_url":"https://api.github.com/repos/cuberite/cuberite/pulls/3151/comments","review_comment_url":"https://api.github.com/repos/cuberite/cuberite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cuberite/cuberite/issues/3151/comments","statuses_url":"https://api.github.com/repos/cuberite/cuberite/statuses/b00fa3237dca34c64fd2131d0a95dd725004445e","head":{"label":"LogicParrot:smartChunkRam","ref":"smartChunkRam","sha":"b00fa3237dca34c64fd2131d0a95dd725004445e","user":{"login":"LogicParrot","id":5030488,"avatar_url":"https://avatars.githubusercontent.com/u/5030488?v=3","gravatar_id":"","url":"https://api.github.com/users/LogicParrot","html_url":"https://github.com/LogicParrot","followers_url":"https://api.github.com/users/LogicParrot/followers","following_url":"https://api.github.com/users/LogicParrot/following{/other_user}","gists_url":"https://api.github.com/users/LogicParrot/gists{/gist_id}","starred_url":"https://api.github.com/users/LogicParrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogicParrot/subscriptions","organizations_url":"https://api.github.com/users/LogicParrot/orgs","repos_url":"https://api.github.com/users/LogicParrot/repos","events_url":"https://api.github.com/users/LogicParrot/events{/privacy}","received_events_url":"https://api.github.com/users/LogicParrot/received_events","type":"User","site_admin":false},"repo":{"id":43133123,"name":"cuberite","full_name":"LogicParrot/cuberite","owner":{"login":"LogicParrot","id":5030488,"avatar_url":"https://avatars.githubusercontent.com/u/5030488?v=3","gravatar_id":"","url":"https://api.github.com/users/LogicParrot","html_url":"https://github.com/LogicParrot","followers_url":"https://api.github.com/users/LogicParrot/followers","following_url":"https://api.github.com/users/LogicParrot/following{/other_user}","gists_url":"https://api.github.com/users/LogicParrot/gists{/gist_id}","starred_url":"https://api.github.com/users/LogicParrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogicParrot/subscriptions","organizations_url":"https://api.github.com/users/LogicParrot/orgs","repos_url":"https://api.github.com/users/LogicParrot/repos","events_url":"https://api.github.com/users/LogicParrot/events{/privacy}","received_events_url":"https://api.github.com/users/LogicParrot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LogicParrot/cuberite","description":"A performant C++ Minecraft compatible game server","fork":true,"url":"https://api.github.com/repos/LogicParrot/cuberite","forks_url":"https://api.github.com/repos/LogicParrot/cuberite/forks","keys_url":"https://api.github.com/repos/LogicParrot/cuberite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LogicParrot/cuberite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LogicParrot/cuberite/teams","hooks_url":"https://api.github.com/repos/LogicParrot/cuberite/hooks","issue_events_url":"https://api.github.com/repos/LogicParrot/cuberite/issues/events{/number}","events_url":"https://api.github.com/repos/LogicParrot/cuberite/events","assignees_url":"https://api.github.com/repos/LogicParrot/cuberite/assignees{/user}","branches_url":"https://api.github.com/repos/LogicParrot/cuberite/branches{/branch}","tags_url":"https://api.github.com/repos/LogicParrot/cuberite/tags","blobs_url":"https://api.github.com/repos/LogicParrot/cuberite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LogicParrot/cuberite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LogicParrot/cuberite/git/refs{/sha}","trees_url":"https://api.github.com/repos/LogicParrot/cuberite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LogicParrot/cuberite/statuses/{sha}","languages_url":"https://api.github.com/repos/LogicParrot/cuberite/languages","stargazers_url":"https://api.github.com/repos/LogicParrot/cuberite/stargazers","contributors_url":"https://api.github.com/repos/LogicParrot/cuberite/contributors","subscribers_url":"https://api.github.com/repos/LogicParrot/cuberite/subscribers","subscription_url":"https://api.github.com/repos/LogicParrot/cuberite/subscription","commits_url":"https://api.github.com/repos/LogicParrot/cuberite/commits{/sha}","git_commits_url":"https://api.github.com/repos/LogicParrot/cuberite/git/commits{/sha}","comments_url":"https://api.github.com/repos/LogicParrot/cuberite/comments{/number}","issue_comment_url":"https://api.github.com/repos/LogicParrot/cuberite/issues/comments{/number}","contents_url":"https://api.github.com/repos/LogicParrot/cuberite/contents/{+path}","compare_url":"https://api.github.com/repos/LogicParrot/cuberite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LogicParrot/cuberite/merges","archive_url":"https://api.github.com/repos/LogicParrot/cuberite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LogicParrot/cuberite/downloads","issues_url":"https://api.github.com/repos/LogicParrot/cuberite/issues{/number}","pulls_url":"https://api.github.com/repos/LogicParrot/cuberite/pulls{/number}","milestones_url":"https://api.github.com/repos/LogicParrot/cuberite/milestones{/number}","notifications_url":"https://api.github.com/repos/LogicParrot/cuberite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LogicParrot/cuberite/labels{/name}","releases_url":"https://api.github.com/repos/LogicParrot/cuberite/releases{/id}","deployments_url":"https://api.github.com/repos/LogicParrot/cuberite/deployments","created_at":"2015-09-25T10:43:49Z","updated_at":"2016-01-11T17:22:23Z","pushed_at":"2016-04-21T18:15:21Z","git_url":"git://github.com/LogicParrot/cuberite.git","ssh_url":"git@github.com:LogicParrot/cuberite.git","clone_url":"https://github.com/LogicParrot/cuberite.git","svn_url":"https://github.com/LogicParrot/cuberite","homepage":"http://cuberite.org","size":79814,"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":"cuberite:master","ref":"master","sha":"4348b2f5a4a3d91aac8808842716fc8527d254e2","user":{"login":"cuberite","id":8973961,"avatar_url":"https://avatars.githubusercontent.com/u/8973961?v=3","gravatar_id":"","url":"https://api.github.com/users/cuberite","html_url":"https://github.com/cuberite","followers_url":"https://api.github.com/users/cuberite/followers","following_url":"https://api.github.com/users/cuberite/following{/other_user}","gists_url":"https://api.github.com/users/cuberite/gists{/gist_id}","starred_url":"https://api.github.com/users/cuberite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuberite/subscriptions","organizations_url":"https://api.github.com/users/cuberite/orgs","repos_url":"https://api.github.com/users/cuberite/repos","events_url":"https://api.github.com/users/cuberite/events{/privacy}","received_events_url":"https://api.github.com/users/cuberite/received_events","type":"Organization","site_admin":false},"repo":{"id":11693709,"name":"cuberite","full_name":"cuberite/cuberite","owner":{"login":"cuberite","id":8973961,"avatar_url":"https://avatars.githubusercontent.com/u/8973961?v=3","gravatar_id":"","url":"https://api.github.com/users/cuberite","html_url":"https://github.com/cuberite","followers_url":"https://api.github.com/users/cuberite/followers","following_url":"https://api.github.com/users/cuberite/following{/other_user}","gists_url":"https://api.github.com/users/cuberite/gists{/gist_id}","starred_url":"https://api.github.com/users/cuberite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuberite/subscriptions","organizations_url":"https://api.github.com/users/cuberite/orgs","repos_url":"https://api.github.com/users/cuberite/repos","events_url":"https://api.github.com/users/cuberite/events{/privacy}","received_events_url":"https://api.github.com/users/cuberite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cuberite/cuberite","description":"A custom Minecraft compatible game server written in C++","fork":false,"url":"https://api.github.com/repos/cuberite/cuberite","forks_url":"https://api.github.com/repos/cuberite/cuberite/forks","keys_url":"https://api.github.com/repos/cuberite/cuberite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cuberite/cuberite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cuberite/cuberite/teams","hooks_url":"https://api.github.com/repos/cuberite/cuberite/hooks","issue_events_url":"https://api.github.com/repos/cuberite/cuberite/issues/events{/number}","events_url":"https://api.github.com/repos/cuberite/cuberite/events","assignees_url":"https://api.github.com/repos/cuberite/cuberite/assignees{/user}","branches_url":"https://api.github.com/repos/cuberite/cuberite/branches{/branch}","tags_url":"https://api.github.com/repos/cuberite/cuberite/tags","blobs_url":"https://api.github.com/repos/cuberite/cuberite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cuberite/cuberite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cuberite/cuberite/git/refs{/sha}","trees_url":"https://api.github.com/repos/cuberite/cuberite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cuberite/cuberite/statuses/{sha}","languages_url":"https://api.github.com/repos/cuberite/cuberite/languages","stargazers_url":"https://api.github.com/repos/cuberite/cuberite/stargazers","contributors_url":"https://api.github.com/repos/cuberite/cuberite/contributors","subscribers_url":"https://api.github.com/repos/cuberite/cuberite/subscribers","subscription_url":"https://api.github.com/repos/cuberite/cuberite/subscription","commits_url":"https://api.github.com/repos/cuberite/cuberite/commits{/sha}","git_commits_url":"https://api.github.com/repos/cuberite/cuberite/git/commits{/sha}","comments_url":"https://api.github.com/repos/cuberite/cuberite/comments{/number}","issue_comment_url":"https://api.github.com/repos/cuberite/cuberite/issues/comments{/number}","contents_url":"https://api.github.com/repos/cuberite/cuberite/contents/{+path}","compare_url":"https://api.github.com/repos/cuberite/cuberite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cuberite/cuberite/merges","archive_url":"https://api.github.com/repos/cuberite/cuberite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cuberite/cuberite/downloads","issues_url":"https://api.github.com/repos/cuberite/cuberite/issues{/number}","pulls_url":"https://api.github.com/repos/cuberite/cuberite/pulls{/number}","milestones_url":"https://api.github.com/repos/cuberite/cuberite/milestones{/number}","notifications_url":"https://api.github.com/repos/cuberite/cuberite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cuberite/cuberite/labels{/name}","releases_url":"https://api.github.com/repos/cuberite/cuberite/releases{/id}","deployments_url":"https://api.github.com/repos/cuberite/cuberite/deployments","created_at":"2013-07-26T19:56:59Z","updated_at":"2016-04-21T17:09:40Z","pushed_at":"2016-04-21T18:15:22Z","git_url":"git://github.com/cuberite/cuberite.git","ssh_url":"git@github.com:cuberite/cuberite.git","clone_url":"https://github.com/cuberite/cuberite.git","svn_url":"https://github.com/cuberite/cuberite","homepage":"http://cuberite.org","size":149665,"stargazers_count":1259,"watchers_count":1259,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":286,"mirror_url":null,"open_issues_count":503,"forks":286,"open_issues":503,"watchers":1259,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/3151"},"html":{"href":"https://github.com/cuberite/cuberite/pull/3151"},"issue":{"href":"https://api.github.com/repos/cuberite/cuberite/issues/3151"},"comments":{"href":"https://api.github.com/repos/cuberite/cuberite/issues/3151/comments"},"review_comments":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/3151/comments"},"review_comment":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cuberite/cuberite/pulls/3151/commits"},"statuses":{"href":"https://api.github.com/repos/cuberite/cuberite/statuses/b00fa3237dca34c64fd2131d0a95dd725004445e"}}}}