[eq-dev] Problem when mapping Distributed Objects

Stefan Eilemann eilemann at gmail.com
Thu Mar 12 18:02:59 CET 2009


On 12. Mar 2009, at 17:17, Dan Wilcox wrote:

> Ok, sorry I solved it just now ...
>
> in applyInstanceData() ...
>
>    memcpy(&_pData, is.getRemainingBuffer(), _ui64DataSize);
>    is.advanceBuffer(_ui64DataSize);
>
> should be
>
>    memcpy(_pData, is.getRemainingBuffer(), _ui64DataSize);
>    is.advanceBuffer(_ui64DataSize);
>
> I was writing into the pointer address and not where it was  
> pointing ...

You can also directly use is.read( _pData, _ui64DataSize); which does  
the same thing.

getRemainingBuffer() is useful if you don't want to copy the data, for  
example if you want to transform it into another structure (e.g.  
decompression).



HTH,

Stefan.
-- 
http://www.eyescale.ch
http://www.equalizergraphics.com
http://www.linkedin.com/in/eilemann






More information about the eq-dev mailing list