[Rd] possible memory leak in e1071 svm

sgerber sgerber at cs.utah.edu
Thu Aug 12 01:59:27 CEST 2010


Hi All

I am developing a package depening on the svm implementation in e1071.
After running some tests I started to run in to memory problems for
moderate size problems.

I attached a simple piece of code and data the reproduces the problem -
running this code with valgrind:
R --vanilla -d "valgrind --tool=memcheck --leak-check=full" < svmtest.R
yields:

==76300== LEAK SUMMARY:
==76300==    definitely lost: 0 bytes in 0 blocks
==76300==    indirectly lost: 0 bytes in 0 blocks
==76300==      possibly lost: 12,186,900 bytes in 5,903 blocks
==76300==    still reachable: 6,552,269 bytes in 1,653 blocks
==76300==         suppressed: 6,414 bytes in 82 blocks
==76300== Reachable blocks (those to which a pointer was found) are not
shown.
==76300== To see them, rerun with: --leak-check=full --show-reachable=yes
==76300== 
==76300== For counts of detected and suppressed errors, rerun with: -v
==76300== ERROR SUMMARY: 1155 errors from 1155 contexts (suppressed: 3
from 3)

Is that relatively large amount of data possibly lost a potential memory
leak?

Thanks
Sam




-------------- next part --------------
library(e1071)
load("testsvm.Rdata")
svm <- svm(y ~ ., df, probability=TRUE,  scale = FALSE)
svm <- NULL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsvm.Rdata
Type: application/x-gzip
Size: 12181 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20100811/cc6d2617/attachment.tgz>


More information about the R-devel mailing list