petdance/scratch — Issue #65: Out of mem (PASM, compreg, invokecc)
Author: petdance
Created: 2011-11-14 05:54:50+00:00
State: open
Labels: bug, core, Pri-normal, Sev-medium

Attached test use compreg P1, "PASM" and invokecc it 100,000 times.
On i386-MSWin32 (mingw32) it consumes 66MB of RAM with r39159 (107 MB of RAM with r11704).

If you replace "lt I20, 100000, NEXT" to "lt I20, 10000000, NEXT" it fails with "Parrot VM: PANIC: Out of mem! C file src\gc\alloc_memory.c, line 142".

{{{
set S28, ""
concat S28, ".pcc_sub :anon _indi:\n"
concat S28, " get_params \"(0,0,0)\", I0, I1, I2\n"
concat S28, " set I3, 23\n"
concat S28, " set_returns \"(0)\", I3\n"
concat S28, " returncc\n"

compreg P1, "PASM"
set I20, 0

NEXT:
set_args "(0)",S28
get_results "(0)", P0
invokecc P1

needs_destroy P0
sweep 0

inc I20
lt I20, 100000, NEXT

# sleep 10

end
}}}

Originally http://trac.parrot.org/parrot/ticket/706