Tensorflow C++接口内存泄漏 使用tcmalloc方法

自古美人都是妖i 提交于 2019-11-27 03:31:03

ubuntu 16.04上使用TCMalloc

1.sudo apt-get install google-perftools

2.在CMakeList.txt中连接动态库

target_link_libraries(smartkit4-svs /usr/lib/libtcmaloc.so.4)

 

参考网址:

https://github.com/tensorflow/tensorflow/issues/5302

https://riptutorial.com/tensorflow/example/13427/use-the-tcmalloc-allocator

http://goog-perftools.sourceforge.net/doc/tcmalloc.html

https://www.mobibrw.com/2017/7519

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!