Hi,

Use valgrind tool (http://valgrind.org/) to check the memory leak problem.
Now the valgrind can be compiled on the following platforms: X86/Linux,
AMD64/Linux, PPC32/Linux, PPC64/Linux.

=================
Before patching
=================
# valgrind --leak-check=full --show-reachable=yes ./message_queue_test_01
...........................
==28721== LEAK SUMMARY:
==28721==    definitely lost: 264 bytes in 1 blocks.
==28721==      possibly lost: 0 bytes in 0 blocks.
==28721==    still reachable: 0 bytes in 0 blocks.
==28721==         suppressed: 0 bytes in 0 blocks.

=================
After patching
=================
# valgrind --leak-check=full --show-reachable=yes ./message_queue_test_01
...........................
==29051== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 1)
==29051== malloc/free: in use at exit: 0 bytes in 0 blocks.
==29051== malloc/free: 1 allocs, 1 frees, 264 bytes allocated.
==29051== For counts of detected errors, rerun with: -v
==29051== All heap blocks were freed -- no leaks are possible.


Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
----------
(See attached file: Fix_mem_leak_message_queue_test_01.patch)


Best regards!

Jin Bing Guo  郭晋兵

Linux for System p Test
IBM China Systems & Technology Laboratory in Beijing
Tel:   +86-10-82454439
Email: [EMAIL PROTECTED]
-------------------------------------
"Do today what others won't so tomorrow you do what other's can't"

Attachment: Fix_mem_leak_message_queue_test_01.patch
Description: Binary data

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to