{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/30083","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/30083/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/30083/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/30083/events","html_url":"https://github.com/rust-lang/rust/issues/30083","id":119200098,"number":30083,"title":"Translating a large static array uses a lot of memory","user":{"login":"sanxiyn","id":45249,"avatar_url":"https://avatars.githubusercontent.com/u/45249?v=3","gravatar_id":"","url":"https://api.github.com/users/sanxiyn","html_url":"https://github.com/sanxiyn","followers_url":"https://api.github.com/users/sanxiyn/followers","following_url":"https://api.github.com/users/sanxiyn/following{/other_user}","gists_url":"https://api.github.com/users/sanxiyn/gists{/gist_id}","starred_url":"https://api.github.com/users/sanxiyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanxiyn/subscriptions","organizations_url":"https://api.github.com/users/sanxiyn/orgs","repos_url":"https://api.github.com/users/sanxiyn/repos","events_url":"https://api.github.com/users/sanxiyn/events{/privacy}","received_events_url":"https://api.github.com/users/sanxiyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-27T13:56:20Z","updated_at":"2015-11-27T20:30:58Z","closed_at":null,"body":"Following 2 lines of Rust code can use more than 200 MB of memory to compile.\r\n\r\n```rust\r\nconst L: usize = 1 << 25;\r\npub static S: [u32; L] = [1; L];\r\n```\r\n\r\n```\r\n$ rustc --crate-type lib -Z time-passes test.rs | grep translation\r\ntime: 0.710; rss: 209MB translation\r\n```\r\n\r\nReported on [users.rust-lang.org post](https://users.rust-lang.org/t/memory-leak-of-rustc/3781). See also #23600."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/160200684","html_url":"https://github.com/rust-lang/rust/issues/30083#issuecomment-160200684","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/30083","id":160200684,"user":{"login":"eefriedman","id":12769964,"avatar_url":"https://avatars.githubusercontent.com/u/12769964?v=3","gravatar_id":"","url":"https://api.github.com/users/eefriedman","html_url":"https://github.com/eefriedman","followers_url":"https://api.github.com/users/eefriedman/followers","following_url":"https://api.github.com/users/eefriedman/following{/other_user}","gists_url":"https://api.github.com/users/eefriedman/gists{/gist_id}","starred_url":"https://api.github.com/users/eefriedman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eefriedman/subscriptions","organizations_url":"https://api.github.com/users/eefriedman/orgs","repos_url":"https://api.github.com/users/eefriedman/repos","events_url":"https://api.github.com/users/eefriedman/events{/privacy}","received_events_url":"https://api.github.com/users/eefriedman/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T20:30:58Z","updated_at":"2015-11-27T20:30:58Z","body":"200MB is possibly slightly excessive... but it's naturally going to take a lot of memory to generate a 30MB object file."}}