{"action":"opened","issue":{"url":"https://api.github.com/repos/ezrosent/allocators-rs/issues/151","repository_url":"https://api.github.com/repos/ezrosent/allocators-rs","labels_url":"https://api.github.com/repos/ezrosent/allocators-rs/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/ezrosent/allocators-rs/issues/151/comments","events_url":"https://api.github.com/repos/ezrosent/allocators-rs/issues/151/events","html_url":"https://github.com/ezrosent/allocators-rs/issues/151","id":299575840,"number":151,"title":"Add committing back to mmap-alloc on Linux/Mac with madvise/MADV_WILLNEED?","user":{"login":"joshlf","id":1046063,"avatar_url":"https://avatars1.githubusercontent.com/u/1046063?v=4","gravatar_id":"","url":"https://api.github.com/users/joshlf","html_url":"https://github.com/joshlf","followers_url":"https://api.github.com/users/joshlf/followers","following_url":"https://api.github.com/users/joshlf/following{/other_user}","gists_url":"https://api.github.com/users/joshlf/gists{/gist_id}","starred_url":"https://api.github.com/users/joshlf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshlf/subscriptions","organizations_url":"https://api.github.com/users/joshlf/orgs","repos_url":"https://api.github.com/users/joshlf/repos","events_url":"https://api.github.com/users/joshlf/events{/privacy}","received_events_url":"https://api.github.com/users/joshlf/received_events","type":"User","site_admin":false},"labels":[{"id":667033886,"url":"https://api.github.com/repos/ezrosent/allocators-rs/labels/component-mmap-alloc","name":"component-mmap-alloc","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-23T02:10:26Z","updated_at":"2018-02-23T02:10:26Z","closed_at":null,"author_association":"COLLABORATOR","body":"We currently don't provide the `commit` method on mmap-alloc's `MapAlloc` on Linux and Mac because pages are always committed dynamically when they are first accessed (whereas, on Windows, accessing an uncommitted page will cause a runtime fault).\r\n\r\nHowever, on Linux and Mac, we *do* allow `MapAlloc` to be configured to commit memory that it allocates by passing the `MAP_POPULATE` flag to `mmap`. Thus, perhaps it would be appropriate by to provide a `commit` method that is backed by a call to `madvise` with its equivalent flag, `MADV_WILLNEED`? It provides essentially the same guarantees as `MAP_POPULATE` (namely, it's only a hint to the kernel and it doesn't change any observable behavior other than possibly performance), which we already provide via the commit configuration.\r\n\r\nThoughts?"}}
{"actor":{"display_login":"joshlf"}}