Menu

#145 memory leak

Other
closed
nobody
5
2007-08-28
2006-06-19
Anonymous
No

I think that there is a memory leak problem in database
interface.
Memory used by my application grow up to 500-600 Mb if
I load persistent-module. If I load ground facts from a
file instead from db, appliacation uses 23 Mb of memory.

To confirm my suspect, I made two tests using
"valgrind" tool to detect memory managment.
In the first test, I load ground facts from persistent
module. Memory used grow up to 140Mb.
In the second test, I load the same facts from a file
module. Memory used grow up to 23Mb.

I attached a file containing the output of valgrind.
Yout can see in the first section that
amount of memory definitely lost is: 43,545,584 bytes.
Memory leak is in driver_manager.so

alexsenatore@tin.it

Discussion

  • Nobody/Anonymous

    Logged In: NO

    ==6068== 4,276,255 bytes in 535 blocks are possibly lost in
    loss record 462 of 467
    ==6068== at 0x401B477: malloc (in
    /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
    ==6068== by 0x4DF0748: (within
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/odbc_driver.so)
    ==6068== by 0x4DF05D9: driverODBC_query (in
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/odbc_driver.so)
    ==6068== by 0x59C7710: queryConnection (in
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/driver_manager.so)
    ==6068== by 0x8086C56: emuloop (in
    /home/axel/Desktop/tesi/software/mapper/src/mapper)
    ==6068==
    ==6068==
    ==6068== 4,290,000 bytes in 429 blocks are possibly lost in
    loss record 463 of 467
    ==6068== at 0x401B477: malloc (in
    /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
    ==6068== by 0x59C846E: (within
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/driver_manager.so)
    ==6068== by 0x59C783F: queryConnection (in
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/driver_manager.so)
    ==6068== by 0x8086C56: emuloop (in
    /home/axel/Desktop/tesi/software/mapper/src/mapper)
    ==6068==
    ==6068==
    ==6068== 13,451,000 bytes in 13,451 blocks are definitely
    lost in loss record 465 of 467
    ==6068== at 0x401B477: malloc (in
    /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
    ==6068== by 0x59C84D8: (within
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/driver_manager.so)
    ==6068== by 0x59C783F: queryConnection (in
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/driver_manager.so)
    ==6068== by 0x8086C56: emuloop (in
    /home/axel/Desktop/tesi/software/mapper/src/mapper)
    ==6068==
    ==6068==
    ==6068== 29,990,000 bytes in 2,999 blocks are definitely
    lost in loss record 466 of 467
    ==6068== at 0x401B477: malloc (in
    /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
    ==6068== by 0x59C846E: (within
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/driver_manager.so)
    ==6068== by 0x59C783F: queryConnection (in
    /home/axel/programs/XSB/config/i686-pc-linux-gnu/lib/driver_manager.so)
    ==6068== by 0x8086C56: emuloop (in
    /home/axel/Desktop/tesi/software/mapper/src/mapper)
    ==6068==
    ==6068== LEAK SUMMARY:
    ==6068== definitely lost: 43,545,584 bytes in 22,619 blocks.
    ==6068== indirectly lost: 36,414,139 bytes in 22,385 blocks.
    ==6068== possibly lost: 10,469,714 bytes in 7,326 blocks.
    ==6068== still reachable: 15,588,841 bytes in 48,545 blocks.
    ==6068== suppressed: 0 bytes in 0 blocks.
    ==6068== Reachable blocks (those to which a pointer was
    found) are not shown.
    ==6068== To see them, rerun with: --show-reachable=yes

     
  • Michael Kifer

    Michael Kifer - 2007-08-28

    Logged In: YES
    user_id=12609
    Originator: NO

    should be fixed now

     
  • Michael Kifer

    Michael Kifer - 2007-08-28
    • status: open --> closed
     

Log in to post a comment.