chenyujing1234 commented on issue #13265: MXNet C++Interface reasoning leads to 
CPU memory leak
URL: 
https://github.com/apache/incubator-mxnet/issues/13265#issuecomment-440115238
 
 
   > Great work, looks like the ASAN build is setup right and detecting errors. 
What I would do now is run the offending code in a loop with a fixed number of 
iterations, then look for a leak that has a multiple of that number. If there's 
a genuine leak it should be present there. For example you could run 
MXPredCreate, MXPredReshape, MXPredForward and then MXPredFree in a loop 123 
times, then look for mem leaks with a multiple of 123 instances.
   > 
   > This guide may also help you:
   > 
https://cwiki.apache.org/confluence/display/MXNET/Detecting+Memory+Leaks+and+Buffer+Overflows+in+MXNet
   Some of my test code need to be modified, otherwise the memory overflow 
error will be reported.
                     include/mxnet_mtcnn.hpp
    42             buffer_.reset(new char[length_ + 1]);
    43             ifs.read(buffer_.get(), length_);
    44             ifs.close();
    45             buffer_[length_] = '\0'; 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to