Memory leak with inout parameters



Hi,

I'm seeing memory leaks in my Perl application which I think are
attributable to ORBit in some way.  I'll append test cases, as they're
fairly small.  The test cases have been run on Linux (as the /proc-
usage indicates), but I've observed this behaviour on Solaris as well.
I've tried this with Perl 5.6.1, Perl-ORBit 0.4.17 and ORBit 0.5.16.
The differences to ORBit 0.5.17 do not look significant.  I've run the
test case with 1000000 iterations, and seem to be losing ~ 58.7 bytes
for each call.  I'm looking for info on whether anyone else sees this
as well as hints on where to start debugging.


							Arne.

module TestModule {
  interface TestInterface {
      void do_test (inout long testVar);
  };
};
#!/usr/bin/perl

package Server;

use strict;
use Error qw(:try);

use vars qw(@ISA);

@ISA = qw(POA_TestModule::TestInterface);

sub new {
    my ($class) = @_;
    return bless {}, $class;
}

my $i;
sub do_test {
    if ($i == 3 or $i == 10000) {
	open(F, "/proc/self/status");
	while (<F>) {
	    print if /VmData/;
	}
	close(F);
    }
    if ($i == 10000) {
	exit();
    }
    $i++;
}


package main;

use strict;

use CORBA::ORBit idl => [ "test.idl" ];

my $orb = CORBA::ORB_init("plugin-orbit-orb");
my $poa = $orb->resolve_initial_references("RootPOA");
my $server = new Server;

my $id = $poa->activate_object($server);
my $ref = $orb->object_to_string($poa->id_to_reference($id));

open(REF, "> /tmp/test.ref") or die($!);
print(REF $ref, "\n");
close(REF);

print("$]\n$CORBA::ORBit::VERSION\n");

$poa->_get_the_POAManager->activate;
close(STDERR);
$orb->run();
#!/usr/bin/perl

use strict;
use CORBA::ORBit idl => [ 'test.idl' ];

my $orb = CORBA::ORB_init("plugin-orbit-orb");
my $poa = $orb->resolve_initial_references("RootPOA");
$poa->_get_the_POAManager->activate;
open(F, "/tmp/test.ref");
chomp(my $ref = <F>);
close(F);

my $server = $orb->string_to_object($ref);

my $var = 42;
while (1) {
    $server->do_test(\$var) or exit();
}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]