{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-core/issues/3106","repository_url":"https://api.github.com/repos/realm/realm-core","labels_url":"https://api.github.com/repos/realm/realm-core/issues/3106/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-core/issues/3106/comments","events_url":"https://api.github.com/repos/realm/realm-core/issues/3106/events","html_url":"https://github.com/realm/realm-core/pull/3106","id":367888781,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMTkzNTUw","number":3106,"title":"Custom heap allocation interface","user":{"login":"simonask","id":23115,"node_id":"MDQ6VXNlcjIzMTE1","avatar_url":"https://avatars2.githubusercontent.com/u/23115?v=4","gravatar_id":"","url":"https://api.github.com/users/simonask","html_url":"https://github.com/simonask","followers_url":"https://api.github.com/users/simonask/followers","following_url":"https://api.github.com/users/simonask/following{/other_user}","gists_url":"https://api.github.com/users/simonask/gists{/gist_id}","starred_url":"https://api.github.com/users/simonask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonask/subscriptions","organizations_url":"https://api.github.com/users/simonask/orgs","repos_url":"https://api.github.com/users/simonask/repos","events_url":"https://api.github.com/users/simonask/events{/privacy}","received_events_url":"https://api.github.com/users/simonask/received_events","type":"User","site_admin":false},"labels":[{"id":320979145,"node_id":"MDU6TGFiZWwzMjA5NzkxNDU=","url":"https://api.github.com/repos/realm/realm-core/labels/T:Internal","name":"T:Internal","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":{"login":"simonask","id":23115,"node_id":"MDQ6VXNlcjIzMTE1","avatar_url":"https://avatars2.githubusercontent.com/u/23115?v=4","gravatar_id":"","url":"https://api.github.com/users/simonask","html_url":"https://github.com/simonask","followers_url":"https://api.github.com/users/simonask/followers","following_url":"https://api.github.com/users/simonask/following{/other_user}","gists_url":"https://api.github.com/users/simonask/gists{/gist_id}","starred_url":"https://api.github.com/users/simonask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonask/subscriptions","organizations_url":"https://api.github.com/users/simonask/orgs","repos_url":"https://api.github.com/users/simonask/repos","events_url":"https://api.github.com/users/simonask/events{/privacy}","received_events_url":"https://api.github.com/users/simonask/received_events","type":"User","site_admin":false},"assignees":[{"login":"simonask","id":23115,"node_id":"MDQ6VXNlcjIzMTE1","avatar_url":"https://avatars2.githubusercontent.com/u/23115?v=4","gravatar_id":"","url":"https://api.github.com/users/simonask","html_url":"https://github.com/simonask","followers_url":"https://api.github.com/users/simonask/followers","following_url":"https://api.github.com/users/simonask/following{/other_user}","gists_url":"https://api.github.com/users/simonask/gists{/gist_id}","starred_url":"https://api.github.com/users/simonask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonask/subscriptions","organizations_url":"https://api.github.com/users/simonask/orgs","repos_url":"https://api.github.com/users/simonask/repos","events_url":"https://api.github.com/users/simonask/events{/privacy}","received_events_url":"https://api.github.com/users/simonask/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-10-08T17:40:02Z","updated_at":"2018-10-09T12:35:05Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/realm/realm-core/pulls/3106","html_url":"https://github.com/realm/realm-core/pull/3106","diff_url":"https://github.com/realm/realm-core/pull/3106.diff","patch_url":"https://github.com/realm/realm-core/pull/3106.patch"},"body":"This introduces a dynamic interface for heap allocation, `realm::util::AllocatorBase`. This interface is totally unrelated to the `realm::Allocator` interface, which is used for allocations related to internal structures in the database.\r\n\r\nThe purpose of this change is to allow us to use custom allocators in the sync server for detailed heap metrics, as well as specialized allocation patterns (especially the scratch allocator).\r\n\r\nIncluded is also some convenience classes and methods for bridging the dynamic allocator interface to standard containers and `std::unique_ptr`, namely `STLAllocator<T, Allocator>` and `STLDeleter<T, Allocator>`. By default, the only overhead associated with this change is an extra pointer for each user of the custom allocator interface (in other words, `std::vector<T, STLAllocator<T>>` and `std::unique_ptr<T, STLDeleter<T>>` get an extra internal pointer). I have some tricks up my sleeve to get rid of this overhead in the future if needed.\r\n\r\n`util::make_unique` can be used to allocate and return an `std::unique_ptr` allocated through a custom allocator with an appropriate deleter.\r\n\r\nIt is non-invasive, but I have adjusted `util::Buffer` (and by extension, `util::AppendBuffer` and `util::StringBuffer`) to use the new interface so we can get add metrics to them on the sync side."},"comment":{"url":"https://api.github.com/repos/realm/realm-core/issues/comments/428174393","html_url":"https://github.com/realm/realm-core/pull/3106#issuecomment-428174393","issue_url":"https://api.github.com/repos/realm/realm-core/issues/3106","id":428174393,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODE3NDM5Mw==","user":{"login":"realm-ci","id":7657856,"node_id":"MDQ6VXNlcjc2NTc4NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/7657856?v=4","gravatar_id":"","url":"https://api.github.com/users/realm-ci","html_url":"https://github.com/realm-ci","followers_url":"https://api.github.com/users/realm-ci/followers","following_url":"https://api.github.com/users/realm-ci/following{/other_user}","gists_url":"https://api.github.com/users/realm-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/realm-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm-ci/subscriptions","organizations_url":"https://api.github.com/users/realm-ci/orgs","repos_url":"https://api.github.com/users/realm-ci/repos","events_url":"https://api.github.com/users/realm-ci/events{/privacy}","received_events_url":"https://api.github.com/users/realm-ci/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T12:35:05Z","updated_at":"2018-10-09T12:35:05Z","author_association":"CONTRIBUTOR","body":"Check the performance result here: https://ci.realm.io/job/realm/job/realm-core/job/PR-3106/8/Performance_Report"}}
{"actor":{"display_login":"realm-ci"}}