[omniORB] Problem releasing memory resources
Mark Johnson
mark.johnson@onfiber.com
Wed, 9 Jan 2002 13:17:36 -0600
ENV: Solaris 2.8, CC 6.0, OmniORB 3
I'm very confused about how to ensure that I am taking care of memory
correctly. In noticed that my servant and client was using an absordant
amount of resources and memory when it shouldn't have been. For a test the
only corba call between the client and servant is on the Heartbeat()
interface which te servant returns a long which is its uptime.
The client calls Heartbeat() once every second. After running for 24 hours
the resource possessed by the client is now at 25M which is absurd.
Can anyone help me diagnose what could be the problem or where to start
looking for where I might be doing something wrong. Another test running is
just the client and servant running by themselves not connected to each
other. Their size and resources have stayed constant over the past 24
hours.
Here's is the servant code:
long Controller_i::Heartbeat( )
{
time_t curr = time(0);
long uptime = (long)difftime( curr, theStartTime );
return uptime;
}
Here's the client code:
void * ActiveServantHeartbeatThread::run_undetached( void * arg )
{
try
{
while( isStopped() == false )
{
SLEEP( 1 );
long time = theActiveServant->getController()->Heartbeat();
PrintUptime( time );
}
}
catch( CORBA::COMM_FAILURE & )
{
theActiveServant->setDisconnected();
}
catch( ... )
{
theActiveServant->setDisconnected();
}
return (void*)( new std::string(getName()) );
}