{"action":"closed","issue":{"url":"https://api.github.com/repos/yappy/Qol/issues/50","repository_url":"https://api.github.com/repos/yappy/Qol","labels_url":"https://api.github.com/repos/yappy/Qol/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/yappy/Qol/issues/50/comments","events_url":"https://api.github.com/repos/yappy/Qol/issues/50/events","html_url":"https://github.com/yappy/Qol/issues/50","id":140269360,"number":50,"title":"Lua state に個別のヒープを割り当てる","user":{"login":"yappy","id":610994,"avatar_url":"https://avatars.githubusercontent.com/u/610994?v=3","gravatar_id":"","url":"https://api.github.com/users/yappy","html_url":"https://github.com/yappy","followers_url":"https://api.github.com/users/yappy/followers","following_url":"https://api.github.com/users/yappy/following{/other_user}","gists_url":"https://api.github.com/users/yappy/gists{/gist_id}","starred_url":"https://api.github.com/users/yappy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yappy/subscriptions","organizations_url":"https://api.github.com/users/yappy/orgs","repos_url":"https://api.github.com/users/yappy/repos","events_url":"https://api.github.com/users/yappy/events{/privacy}","received_events_url":"https://api.github.com/users/yappy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yappy/Qol/labels/task%20B","name":"task B","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"yappy","id":610994,"avatar_url":"https://avatars.githubusercontent.com/u/610994?v=3","gravatar_id":"","url":"https://api.github.com/users/yappy","html_url":"https://github.com/yappy","followers_url":"https://api.github.com/users/yappy/followers","following_url":"https://api.github.com/users/yappy/following{/other_user}","gists_url":"https://api.github.com/users/yappy/gists{/gist_id}","starred_url":"https://api.github.com/users/yappy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yappy/subscriptions","organizations_url":"https://api.github.com/users/yappy/orgs","repos_url":"https://api.github.com/users/yappy/repos","events_url":"https://api.github.com/users/yappy/events{/privacy}","received_events_url":"https://api.github.com/users/yappy/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-03-11T19:26:07Z","updated_at":"2016-03-14T16:27:47Z","closed_at":"2016-03-14T16:27:47Z","body":"現在はデフォルトのアロケータを使っているので libc の malloc/free を使っています。\r\nつまり、ゲーム本体の new/delete で使っている、プロセスのデフォルトヒープ(多分)を共用しています。\r\n\r\nというわけで、スクリプトで悪さをして GC に回収されないようにしながらオブジェクトを大量に作り続けると共用ヒープがモリモリ拡張されていき(プロセスのメモリ使用量がえらいことになると思う)、そのうち確保関数が残当して Lua がエラーを起こすのはともかく本体での new (コンテナクラスの内部を含む) が bad_alloc 投げて大残当する恐れがあります。\r\n"}}