[omniORB] consecutive sequences?

Duncan Grisby duncan@grisby.org
Fri Jul 19 16:33:16 2002


On Wednesday 17 July, Alexy Khrabrov wrote:

> An efficient way to fetch rows from a database is by using a bulk
> load into array, when all the rows are loaded into the array at once.
> The array, of course, must be a solid consecutive chunk of memory.
> Does omniORB implement the sequence type so that it's consecutive?
> In the examples I saw, a sequence is gradually enlarged with length(),
> and each new element is allocated on the heap, which is clearly 
> not array-like...

Look at the sequence's get_buffer() method. As long as your sequence
is simple, that will do what you want. If you've got a sequence of
complex types, the CORBA memory management rules will get in the way.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --