I am having trouble with some Inline::C code that gobbles up all of my computer memory. Here is a simple example below that illustrates the problem (the full blown code is much more involved and runs out of memory fairly fast ... I chart the memory leakage with the "top" Unix command);
#!/usr/freeware/bin/perl
@list = (0 .. 100000);
foreach $var ( @list) {
print map {"$_\n"} get_data();
}
use Inline C => <<'END';
void get_data() {
int idat1;
long ndat1;
Inline_Stack_Vars;
idat1 = 7;
ndat1 = 22.0;
Inline_Stack_Reset;
Inline_Stack_Push(newSViv(idat1));
Inline_Stack_Push(newSVnv(ndat1));
Inline_Stack_Done;
}
END
Thanks for any help in advance,
Greg S.
Strahan, Gregory N.vcf
Description: Binary data
