20,741
edits
| Line 132: | Line 132: | ||
:::: I'll try that, since the issues don't go away when I delete the test namespace it's likely that I introduced a leak in the C side of things (which I still find odd). [[User:Philosopher|—Philosopher]] ([[User talk:Philosopher|talk]]) 00:07, 15 August 2013 (UTC) | :::: I'll try that, since the issues don't go away when I delete the test namespace it's likely that I introduced a leak in the C side of things (which I still find odd). [[User:Philosopher|—Philosopher]] ([[User talk:Philosopher|talk]]) 00:07, 15 August 2013 (UTC) | ||
::::: It's been a while since I ran nasal in valgrind, but IIRC Andy never frees his naPools, so you may need to explicitly call free on each pool at the end to ensure that valgrind isn't getting confused by Nasal's very own memory management. In case of doubt, run first a simple hello world program via valgrind/nasal and check if the output makes sense, if it doesn't, it's because of the GC pools, which may not be explicitly freed by the program at termination (which isn't too uncommon, because programmers generally rely on the OS to reclaim all allocated memory). Okay, just tried it via the shell (valgrind nasal-bin hello.nas): | ::::: It's been a while since I ran nasal in valgrind, but IIRC Andy never frees his naPools, so you may need to explicitly call free on each pool at the end to ensure that valgrind isn't getting confused by Nasal's very own memory management. In case of doubt, run first a simple hello world program via valgrind/nasal and check if the output makes sense, if it doesn't, it's because of the GC pools, which may not be explicitly freed by the program at termination (which isn't too uncommon, because programmers generally rely on the OS to reclaim all allocated memory at program termination). Okay, just tried it via the shell (valgrind nasal-bin hello.nas): | ||
<pre> | <pre> | ||
var x=[1,2,3]; | var x=[1,2,3]; | ||