PMCProxy Leaks

chromatic chromatic at wgz.org
Tue Jun 9 09:43:52 UTC 2009


This program leaks 700k of memory:

.sub 'main' :main
    $P0 = new 'ParrotInterpreter'
    end
.end

Here's the source of most of those woes:

==13530== 131,096 bytes in 1 blocks are still reachable in loss record 1,886 
of 
1,886
==13530==    at 0x4007092: calloc (vg_replace_malloc.c:397)
==13530==    by 0x4097A04: mem__internal_allocate_zeroed (alloc_memory.c:133)
==13530==    by 0x4198441: alloc_new_block (alloc_resources.c:113)
==13530==    by 0x4198594: initialize_memory_pools (alloc_resources.c:675)
==13530==    by 0x409964C: Parrot_gc_initialize (api.c:213)
==13530==    by 0x40A5793: make_interpreter (inter_create.c:172)
==13530==    by 0x41B812C: create_interp (parrotinterpreter.pmc:168)
==13530==    by 0x41B82E2: Parrot_ParrotInterpreter_init 
(parrotinterpreter.pmc:
243)
==13530==    by 0x40FAD82: pmc_new (pmc.c:120)
==13530==    by 0x423AD7D: Parrot_PMCProxy_instantiate (pmcproxy.pmc:200)
==13530==    by 0x405E10D: Parrot_new_p_sc (pmc.ops:59)
==13530==    by 0x40FD1D1: runops_slow_core (cores.c:462)
==13530==    by 0x40FC7DE: runops_int (main.c:987)
==13530==    by 0x40A65B1: runops (ops.c:107)
==13530==    by 0x40A673E: runops_args (ops.c:256)
==13530==    by 0x40A7404: Parrot_runops_fromc_args (ops.c:325)
==13530==    by 0x408B0F1: Parrot_runcode (embed.c:1014)
==13530==    by 0x42636F9: imcc_run (main.c:801)
==13530==    by 0x8048974: main (main.c:61)
==13530== 
==13530== LEAK SUMMARY:
==13530==    definitely lost: 0 bytes in 0 blocks.
==13530==      possibly lost: 0 bytes in 0 blocks.
==13530==    still reachable: 739,716 bytes in 2,537 blocks.
==13530==         suppressed: 0 bytes in 0 blocks.

This looks awfully familiar; it resembles a Rakudo memory leak of Sub PMCs.

-- c


More information about the parrot-dev mailing list