[omniORB] Array size limit
Duncan Grisby
duncan at grisby.org
Fri May 9 11:31:41 BST 2008
On Wednesday 7 May, Klas Nordberg wrote:
> I'm testing how long time it takes to send large arrays of bytes
> (CORBA::Octet) between a server and client using omniORB CORBA by
> writing a client which sends 10^6 bytes to a server which just copies
> the received byte array to a local buffer.
>
> On a linux platform this works fine, but when I tested to run the
> client on a Windows platform, I get a stack overflow runtime error
> (not an exception) from somewhere deep in the ORB. When I decrease
> the size of the array, however, it works. Apparently, there is a
> limit on the amount of data in an array which can be processed by the
> ORB.
The C++ mapping for arrays places the array on the stack, and you're
just running out of stack space. There's not a whole lot omniORB can do
about that. You can increase the stack size omniORB uses for each
thread, by setting the omni_thread::stacksize() static function, but
that will only make the problem occur at larger sizes.
A better idea is to use a sequence<octet>, since the C++ mapping puts
the data on the heap, and thus isn't limited to stack size.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list