{"action":"closed","issue":{"url":"https://api.github.com/repos/raspberrypi/firmware/issues/310","repository_url":"https://api.github.com/repos/raspberrypi/firmware","labels_url":"https://api.github.com/repos/raspberrypi/firmware/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/firmware/issues/310/comments","events_url":"https://api.github.com/repos/raspberrypi/firmware/issues/310/events","html_url":"https://github.com/raspberrypi/firmware/issues/310","id":41909385,"number":310,"title":"mmal: Memory leak using port_allocator","user":{"login":"julianscheel","id":985759,"avatar_url":"https://avatars1.githubusercontent.com/u/985759?v=4","gravatar_id":"","url":"https://api.github.com/users/julianscheel","html_url":"https://github.com/julianscheel","followers_url":"https://api.github.com/users/julianscheel/followers","following_url":"https://api.github.com/users/julianscheel/following{/other_user}","gists_url":"https://api.github.com/users/julianscheel/gists{/gist_id}","starred_url":"https://api.github.com/users/julianscheel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianscheel/subscriptions","organizations_url":"https://api.github.com/users/julianscheel/orgs","repos_url":"https://api.github.com/users/julianscheel/repos","events_url":"https://api.github.com/users/julianscheel/events{/privacy}","received_events_url":"https://api.github.com/users/julianscheel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2014-09-04T08:39:04Z","updated_at":"2017-12-19T11:55:47Z","closed_at":"2017-12-19T11:55:47Z","author_association":"NONE","body":"We use mmal_pool_create_with_allocator utilising mmal_port_payload_alloc/free for allocating our mmal pools. Doing this mmal leaks memory on each create/destroy cycle. I stumbled into this with our vlc image_fx plugin, but I think it is the same for pools on the vout. The following gist demonstrates the problem: https://gist.github.com/julianscheel/ba38776f26f5aa0bc5ee\nBinary provided here: http://jusst.de/files/mmal-leak\nWhen using mmal_pool_create() without using the port specific allocators everything seems fine. Just keep top open while running that demo tool. It will pause 10 seconds between the demo loops, so you can see the difference.\n\nBesides the actual leak: I'm a bit unsure on when to use the mmal_port_payload_alloc/free at all? It seems to be able to allocate code directly on the videocore, but in our usecase it actually only needs to allocate memory on the host-side (holding the opaque pointers) I think. So is there any point at all in using it?\n"}}
{"actor":{"display_login":"JamesH65"}}