Hi John! I update the code (github): https://github.com/avazquezdev/TestValgrindJava
> >Please state the version of valgrind ("valgrind --version"), >and the hardware architecture, and the operating system and version. valgrind-3.10.1 Kubuntu 15.04 (64bits) > >Please tell us how many (within a few percent), and post (copy+paste) >two complete example complaints. > I created two files with the outputs whether or no memory leak. https://github.com/avazquezdev/TestValgrindJava/tree/master/ErrorInfo > >Please give an example, and explain why not. Do your routines have names? >Do those names appear in the complaints from memcheck? When I allocate memory valgrind show the next: https://github.com/avazquezdev/TestValgrindJava/blob/master/ErrorInfo/Example1.txt In this text I see nothing to indicate that my library allocates/free memory. 2015-10-10 16:03 GMT+02:00 John Reiser <jrei...@bitwagon.com>: > > I want to use valgrind to detect memory leaks for a library in Java > native interface. > > For this I made a sample program by pressing a key reserve memory and > another > > pressing the release and one for exiting the program. > > > > I have 2 problems: > > * If I activate the options to detect memory leaks I see too many > failures. > > Please tell us how many (within a few percent), and post (copy+paste) > two complete example complaints. > > > * I can not detect which are memory leaks in my library. > > Please give an example, and explain why not. Do your routines have names? > Do those names appear in the complaints from memcheck? > > > > > Option for valgrind: > > valgrind --smc-check=all --trace-children=yes --show-leak-kinds=all > --track-origins=yes -v --leak-check=yes java -Djava.library.path=. App > > Please state the version of valgrind ("valgrind --version"), > and the hardware architecture, and the operating system and version. > > > > > Is there any way to filter leaks only my library? > > If you can determine which are in your library, then encode that knowledge > into a filter (using python, perl, sed, awk, ...). However, in general a > leak > results from a misunderstanding about some interface or software contract. > Usually there are at least two pieces of software involved in creating a > leak: > the allocator and the non-free()r. The leak "belongs" to the combination > of all of the pieces. > > > Do the choices I am using to search for leaks is right for Java native > code? > > We cannot say until you post verbatim examples of the output that you get. > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Valgrind-users mailing list > Valgrind-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/valgrind-users >
------------------------------------------------------------------------------
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users