Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-06-18 10:11:25


David Abrahams wrote:
> I was just watching the memory consumption of bjam as I was starting a
> large build, and it quickly went up to 50MB!
>
> The question is, are we simply leaking memory, or is this just how much
> space those data structures occupy? If it's a leak, I bet fixing it would
> speed things up considerably!

Here's what valgrind tells me:

==16390==
==16390== ERROR SUMMARY: 10 errors from 2 contexts (suppressed: 0 from 0)
==16390== malloc/free: in use at exit: 1530071 bytes in 50260 blocks.
==16390== malloc/free: 126612 allocs, 76352 frees, 9254751 bytes allocated.
==16390== For counts of detected errors, rerun with: -v
==16390== searching for pointers to 50260 not-freed blocks.
==16390== checked 5732580 bytes.
==16390==
==16390== definitely lost: 637466 bytes in 12274 blocks.
==16390== possibly lost: 3029 bytes in 20 blocks.
==16390== still reachable: 889576 bytes in 37966 blocks.
==16390==
==16390== 12 bytes in 1 blocks are possibly lost in loss record 1 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D924: targetentry (in /home/ghost/local/bin/bjam)
==16390== by 0x804D8F7: targetlist (in /home/ghost/local/bin/bjam)
==16390== by 0x804F941: builtin_depends (in /home/ghost/local/bin/bjam)
==16390==
==16390== 24 bytes in 2 blocks are possibly lost in loss record 3 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D9DA: addsettings (in /home/ghost/local/bin/bjam)
==16390== by 0x8049CDA: compile_local (in /home/ghost/local/bin/bjam)
==16390== by 0x804D76C: parse_evaluate (in /home/ghost/local/bin/bjam)
==16390==
==16390== 113 bytes in 2 blocks are possibly lost in loss record 5 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D3CF: newstr (in /home/ghost/local/bin/bjam)
==16390== by 0x804EB31: time_enter (in /home/ghost/local/bin/bjam)
==16390== by 0x8050897: file_dirscan (in /home/ghost/local/bin/bjam)
==16390==
==16390== 160 bytes in 10 blocks are definitely lost in loss record 6 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804A4A3: evaluate_rule (in /home/ghost/local/bin/bjam)
==16390== by 0x8049E72: compile_rule (in /home/ghost/local/bin/bjam)
==16390== by 0x804D76C: parse_evaluate (in /home/ghost/local/bin/bjam)
==16390==
==16390== 192 bytes in 16 blocks are definitely lost in loss record 7 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D960: actionlist (in /home/ghost/local/bin/bjam)
==16390== by 0x804A513: evaluate_rule (in /home/ghost/local/bin/bjam)
==16390== by 0x8049E72: compile_rule (in /home/ghost/local/bin/bjam)
==16390==
==16390== 1548 bytes in 129 blocks are definitely lost in loss record 13 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804BC2F: list_new (in /home/ghost/local/bin/bjam)
==16390== by 0x8049275: main (in /home/ghost/local/bin/bjam)
==16390== by 0x4031814F: (within /lib/libc-2.2.5.so)
==16390==
==16390== 2124 bytes in 177 blocks are definitely lost in loss record 14 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D924: targetentry (in /home/ghost/local/bin/bjam)
==16390== by 0x804D8F7: targetlist (in /home/ghost/local/bin/bjam)
==16390== by 0x804F941: builtin_depends (in /home/ghost/local/bin/bjam)
==16390==
==16390== 2880 bytes in 15 blocks are possibly lost in loss record 16 of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804F2E3: string_reserve_internal (in
/home/ghost/local/bin/bjam)
==16390== by 0x804F370: extend_full (in /home/ghost/local/bin/bjam)
==16390== by 0x804F401: string_append (in /home/ghost/local/bin/bjam)
==16390==
==16390== 14344 bytes in 326 blocks are definitely lost in loss record 21 of
29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D645: parse_make (in /home/ghost/local/bin/bjam)
==16390== by 0x8051739: yyparse (in /home/ghost/local/bin/bjam)
==16390== by 0x804D5EF: parse_file (in /home/ghost/local/bin/bjam)
==16390==
==16390== 51180 bytes in 4265 blocks are definitely lost in loss record 23 of
29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D9DA: addsettings (in /home/ghost/local/bin/bjam)
==16390== by 0x804A08B: collect_arguments (in /home/ghost/local/bin/bjam)
==16390== by 0x804A537: evaluate_rule (in /home/ghost/local/bin/bjam)
==16390==
==16390== 173998 bytes in 3552 blocks are definitely lost in loss record 26
of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804D3CF: newstr (in /home/ghost/local/bin/bjam)
==16390== by 0x804B1A8: var_expand (in /home/ghost/local/bin/bjam)
==16390== by 0x804ACBD: var_expand (in /home/ghost/local/bin/bjam)
==16390==
==16390== 393920 bytes in 3799 blocks are definitely lost in loss record 28
of 29
==16390== at 0x4004088B: (within /usr/lib/valgrind/valgrind.so)
==16390== by 0x804F2E3: string_reserve_internal (in
/home/ghost/local/bin/bjam)
==16390== by 0x804F370: extend_full (in /home/ghost/local/bin/bjam)
==16390== by 0x804F401: string_append (in /home/ghost/local/bin/bjam)
==16390==
==16390== LEAK SUMMARY:
==16390== possibly lost: 3029 bytes in 20 blocks.
==16390== definitely lost: 637466 bytes in 12274 blocks.
==16390== still reachable: 889576 bytes in 37966 blocks.
==16390== Reachable blocks (those to which a pointer was found) are not shown.
==16390== To see them, rerun with: --show-reachable=yes
==16390==

- Volodya

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk