introlab / find-object

Find-Object project
http://introlab.github.io/find-object/
BSD 3-Clause "New" or "Revised" License
448 stars 189 forks source link

Fix memory leak linux (use tcmalloc to compile) #62

Closed nhudinh2103 closed 6 years ago

nhudinh2103 commented 6 years ago

Currently in Linux, if you have loaded session with many objects (> 1000), find_object will increase memory when request tcp overtime.

Example: a. Non parrallel ./find_object --images_not_saved --console --session /your_session.bin (Load session) ./find_object-tcpRequest --json "out.json" --scene /your_screen.jpg --port 6000 (Run tcp request)

b. Parrallel ./find_object --images_not_saved --console --session /your_session.bin --tcp_threads 4 (Load session)

./find_object-tcpRequest --json "out.json" --scene /your_screen1.jpg --port 6000 ./find_object-tcpRequest --json "out.json" --scene /your_screen2.jpg --port 6001 ./find_object-tcpRequest --json "out.json" --scene /your_screen3.jpg --port 6002 ./find_object-tcpRequest --json "out.json" --scene /your_screen4.jpg --port 6003 (Run 4 tcp requests parallel)

Here's the step I have do to solve this:

If you know a better way, let me know because i don't know how to add install google-pertools step with cmake