{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11280","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11280/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11280/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11280/events","html_url":"https://github.com/JuliaLang/julia/pull/11280","id":76628845,"number":11280,"title":"RFC: mmap makeover","user":{"login":"quinnj","id":2896623,"avatar_url":"https://avatars.githubusercontent.com/u/2896623?v=3","gravatar_id":"","url":"https://api.github.com/users/quinnj","html_url":"https://github.com/quinnj","followers_url":"https://api.github.com/users/quinnj/followers","following_url":"https://api.github.com/users/quinnj/following{/other_user}","gists_url":"https://api.github.com/users/quinnj/gists{/gist_id}","starred_url":"https://api.github.com/users/quinnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinnj/subscriptions","organizations_url":"https://api.github.com/users/quinnj/orgs","repos_url":"https://api.github.com/users/quinnj/repos","events_url":"https://api.github.com/users/quinnj/events{/privacy}","received_events_url":"https://api.github.com/users/quinnj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-05-15T07:15:17Z","updated_at":"2015-05-17T11:11:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/11280","html_url":"https://github.com/JuliaLang/julia/pull/11280","diff_url":"https://github.com/JuliaLang/julia/pull/11280.diff","patch_url":"https://github.com/JuliaLang/julia/pull/11280.patch"},"body":"So I kind of got led down a rabbit hole here, but it seems the mmap code was due for a face-lift. In particular:\r\n\r\n- The method signatures varied drastically between unix and windows, good luck writing cross platform code without lots of `@unix_only` and `@windows_only`; what's here isn't perfect in this regard, but goes a long way towards more consistency\r\n- The method signatures that did match were duplicated in different unix/windows sections. This is probably ok, but the second you want to update a method, you have to remember to update it in two places\r\n- A `mmap` function didn't even even exist for windows, but was buried in the `mmap_array` method\r\n\r\nThis PR introduces the `Mmap` module, along with a `Mmap.Stream` type, that holds a reference to an mmapped-file (who really wants to play with pointers anyway...). The implementation is limited for now, you can basically just create a `Stream` and that's about it, but you can imagine uncommenting out my `# <: IO` subtyping and turning it into a proper `IO` type in a future iteration. Just managing the platform code re-workings and deprecations was quite the effort.\r\n\r\nI'd appreciate any feedback on the design and confirmation that the deprecations are all in order.\r\n\r\nThis passed local tests for me on 64-bit OSX as well as 64-bit Windows. "},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/102784579","html_url":"https://github.com/JuliaLang/julia/pull/11280#issuecomment-102784579","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11280","id":102784579,"user":{"login":"timholy","id":1525481,"avatar_url":"https://avatars.githubusercontent.com/u/1525481?v=3","gravatar_id":"","url":"https://api.github.com/users/timholy","html_url":"https://github.com/timholy","followers_url":"https://api.github.com/users/timholy/followers","following_url":"https://api.github.com/users/timholy/following{/other_user}","gists_url":"https://api.github.com/users/timholy/gists{/gist_id}","starred_url":"https://api.github.com/users/timholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timholy/subscriptions","organizations_url":"https://api.github.com/users/timholy/orgs","repos_url":"https://api.github.com/users/timholy/repos","events_url":"https://api.github.com/users/timholy/events{/privacy}","received_events_url":"https://api.github.com/users/timholy/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T11:11:53Z","updated_at":"2015-05-17T11:11:53Z","body":"First do simple stuff like `println(pointer(A.s))` to check for some obvious problem (like a NULL pointer), and possibly copy/pasting the contents of `sharedarray.jl` into a `module MySharedArray ... end` and inserting @show statements at relevant points to watch what happens during creation. If that doesn't suffice, do `make debug` and then `gdb julia` and try to capture the backtrace. More detail in http://docs.julialang.org/en/latest/devdocs/backtraces/ and http://docs.julialang.org/en/latest/devdocs/debuggingtips/"}}