MNN
MNN copied to clipboard
使用valgrind工具,发现在X86 Linux环境下存在内存泄露问题
使用该仓库,https://github.com/Hanson0910/MNNFaceDetect
基于MNN的人脸检测,在X86 Linux运行
使用valgrind分析,在X86 Linux环境下跑,mnn使用了2.0.2分支编译得到,同时尝试了master分支,还有mnn1.2.9分支,都检测存在内存泄露。
valgrind --tool=memcheck ./facedet --leak-check=full
。。。
==35598==
==35598== HEAP SUMMARY:
==35598== in use at exit: 19,156,391 bytes in 15,501 blocks
==35598== total heap usage: 36,103 allocs, 20,602 frees, 127,389,641 bytes allocated
==35598==
==35598== LEAK SUMMARY:
==35598== definitely lost: 144 bytes in 2 blocks #确定存在内存泄露
==35598== indirectly lost: 120,600 bytes in 5 blocks #间接存在内存泄露
==35598== possibly lost: 3,733,016 bytes in 292 blocks
==35598== still reachable: 15,302,631 bytes in 15,202 blocks
==35598== suppressed: 0 bytes in 0 blocks
==35598== Rerun with --leak-check=full to see details of leaked memory
==35598==
==35598== For counts of detected and suppressed errors, rerun with: -v
==35598== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
看下是哪部分的内存泄露,valgrind 检查出来的有可能是初始的 register ,这个在实用中无影响
这个内存泄露不影响