[omniORB] Problem releasing memory resources

Mark Johnson mark.johnson@onfiber.com
Wed, 9 Jan 2002 13:47:21 -0600


Sorry, I should have said that the memory resources after 24 hours for the
Client is 25M and Servant is 29M.  Also, there is no memory allocated in
PrintUptime().  Actually, there is no memory allocated anywhere in the
client except in creation of the omni_thread "ActiveServantHeartbeatThread"
and the
return value from run_undetached().

> -----Original Message-----
> From: Mark Johnson 
> Sent: Wednesday, January 09, 2002 1:18 PM
> To: OmniOrb Mailing List (E-mail)
> Subject: [omniORB] Problem releasing memory resources
> 
> 
> 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()) );
> }
> 
>