[VPM] module memory leak
Jeremy Aiyadurai
jeremygwa at hotmail.com
Fri Jan 21 22:27:43 PST 2005
hi all,
i am using a module called Win32::IPHelper.
I call two of its functions inside an infinite loop, (yes it needs to be
infinite).
The program eats memory fast, between 4 and 15 KB / sec
What can i do so it does not eat memory like this? The problem does not seem
to be my code,
I think it is the module.
Thanks in advance for any help.
-Jeremy A.
below is the program to test for yourself.
-------
use Win32::IPHelper;
sub portprocloop {
my @cp;
my @PROCUDP_EX_TABLE;
my @PROCTCP_EX_TABLE;
my @PP;
while (1) {
@PROCUDP_EX_TABLE = (-1);
@PROCTCP_EX_TABLE = (-1);
@PP = (-1);
$ret =
Win32::IPHelper::AllocateAndGetUdpExTableFromStack(
\@PROCUDP_EX_TABLE,
$bOrder );
$ret =
Win32::IPHelper::AllocateAndGetTcpExTableFromStack(
\@PROCTCP_EX_TABLE,
$bOrder );
push(@PP, at PROCUDP_EX_TABLE);
push(@PP, at PROCTCP_EX_TABLE);
foreach (@PP) {
#print $_->{ProcessId},",",$_->{LocalPort},"\n";
}
Win32::Sleep(200);
}
}
portprocloop();
More information about the Victoria-pm
mailing list