[omniORB] (no subject)
Stefan Kimmig
Stefan.Kimmig at gmx.de
Wed Jul 8 10:56:52 BST 2009
Hello,
I am using OmniORB 4.1.3 on an AT91SAM9263 processor with realtime kernel 2.6.29.1-rt8, but i got the following problem:
I want to build an soft rt application which communicates via omniorb. This application should be a server and a client at the same time. At the beginning of the application I lock all the memory with the mlockall() command. When I run the application the size of locked memory gets higher and higher and after some time, the processor runs out of ram. Is there a problem of using omniORB in rt application or has anyone tested omniorb in a realtime process?
here ist my programm code:
int main(int argc, char* argv[])
{
// Allocate some memory
int i, page_size;
char* buffer;
mlockall(MCL_CURRENT | MCL_FUTURE )
// Turn off malloc trimming.
mallopt (M_TRIM_THRESHOLD, -1);
// Turn off mmap usage.
mallopt (M_MMAP_MAX, 0);
page_size = sysconf(_SC_PAGESIZE);
buffer = malloc(SOMESIZE);
for (i=0; i < SOMESIZE; i+=page_size)
{
buffer[i] = 0;
}
free(buffer);
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
CORBA:Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
Echo_i* myecho = new Echo_i();
PortableServer::ObjectId_var myechoid = poa->activate_object(myecho);
obj = myecho->_this();
CORBA::String_var sior(orb->object_to_string(obj));
cout << (char*)sior << endl;
PortableServer::POAManager_var pman = poa->the_POAManager();
pman->activate();
return 0;
}
--
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
More information about the omniORB-list
mailing list