{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/1339","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/1339/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/1339/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/1339/events","html_url":"https://github.com/JuliaLang/julia/issues/1339","id":7388764,"number":1339,"title":"use explicit mmap/munmap on mac","user":{"login":"staticfloat","id":130920,"avatar_url":"https://avatars.githubusercontent.com/u/130920?v=3","gravatar_id":"","url":"https://api.github.com/users/staticfloat","html_url":"https://github.com/staticfloat","followers_url":"https://api.github.com/users/staticfloat/followers","following_url":"https://api.github.com/users/staticfloat/following{/other_user}","gists_url":"https://api.github.com/users/staticfloat/gists{/gist_id}","starred_url":"https://api.github.com/users/staticfloat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staticfloat/subscriptions","organizations_url":"https://api.github.com/users/staticfloat/orgs","repos_url":"https://api.github.com/users/staticfloat/repos","events_url":"https://api.github.com/users/staticfloat/events{/privacy}","received_events_url":"https://api.github.com/users/staticfloat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/mac","name":"mac","color":"DDDDDD"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/performance","name":"performance","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2012-10-05T20:27:45Z","updated_at":"2015-03-25T14:14:20Z","closed_at":null,"body":"I've noticed that Julia is quite a hungry lady.  :)\r\n\r\nShe seems to accumulate memory even when I wouldn't expect her to.  Calling `gc()` seems to help stopping julia from increasing her memory usage sometimes, but never does the memory usage decrease, it only ever increases.  This means that if my program had an extremely memory intensive startup phase and then a low memory requirement for the rest of its long lifespan, other processes would not be able to use the memory that is sitting in Julia's \"free pool\".  (Not sure if I have the implementation details right, but this is what I've been able to ascertain so far)\r\n\r\nIs there a way to convince julia to give some of her \"free pool\" back to the OS?  I'm assuming that `gc()` finds orphaned memory segments and simply tags them as available to be used by further allocations in `julia`, and its not meant to actually free data back to the OS.\r\n\r\nTest to reproduce: type `a = randn(10000,1000)` N times into a REPL, and watch the memory usage grow.  After a few times of that, type `gc()`, and then create more `a` matrices. For the first N times the memory usage of `julia` will not grow, but once you exhaust Julia's \"free pool\", it will begin to expand again."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/86045375","html_url":"https://github.com/JuliaLang/julia/issues/1339#issuecomment-86045375","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/1339","id":86045375,"user":{"login":"ihnorton","id":327706,"avatar_url":"https://avatars.githubusercontent.com/u/327706?v=3","gravatar_id":"","url":"https://api.github.com/users/ihnorton","html_url":"https://github.com/ihnorton","followers_url":"https://api.github.com/users/ihnorton/followers","following_url":"https://api.github.com/users/ihnorton/following{/other_user}","gists_url":"https://api.github.com/users/ihnorton/gists{/gist_id}","starred_url":"https://api.github.com/users/ihnorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihnorton/subscriptions","organizations_url":"https://api.github.com/users/ihnorton/orgs","repos_url":"https://api.github.com/users/ihnorton/repos","events_url":"https://api.github.com/users/ihnorton/events{/privacy}","received_events_url":"https://api.github.com/users/ihnorton/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T14:14:19Z","updated_at":"2015-03-25T14:14:19Z","body":"Is this still an issue after all of the GC work and other improvements?"}}