clementfarabet / lua---ffmpeg

An interface between ffmpeg and Lua/Torch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible memory leak

daoudChami opened this issue · comments

Hello,

It seems that after a few calls on ffmpeg.Video with the load parameter set to true, the memory used by the previous video is not freed even though the same object is used to recieve the return value of ffmpeg.Video.

Regards

EDIT : The memory leak is confirmed. Its due to image:load. Lua gc cant free tensors created by image:load...
https://groups.google.com/forum/#!topic/torch7/mWcQjP2WEVQ

that thread is old news. we now have heap tracking for tensors, that automatically triggers the GC after certain memory thresholds. can you upgrade your torch / cutorch and reconfirm.

Thank you for your reply.

Regards

2016-02-08 16:57 GMT+01:00 Soumith Chintala notifications@github.com:

that thread is old news. we now have heap tracking for tensors, that
automatically triggers the GC after certain memory thresholds. can you
upgrade your torch / cutorch and reconfirm.


Reply to this email directly or view it on GitHub
#12 (comment)
.

The memory used can still get pretty outrageous if converting a few hundred videos, but only if you don't call garbage collect manually. Maybe ffmpeg should call garbagecollect somewhere?