summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/ObjectStore.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-03-15 16:53:10 +0100
committerJose <jose@zeroc.com>2012-03-15 16:53:10 +0100
commitb2a3402c30a42b5b5344c2758166d1a3a6534f6b (patch)
treeb111a0c07d9f2eedcad1b1c59a67ec050d5667dc /cpp/src/Freeze/ObjectStore.cpp
parentserialVersionUID fix to use IceUtilInternal::stringToInt64 for numeric conver... (diff)
downloadice-b2a3402c30a42b5b5344c2758166d1a3a6534f6b.tar.bz2
ice-b2a3402c30a42b5b5344c2758166d1a3a6534f6b.tar.xz
ice-b2a3402c30a42b5b5344c2758166d1a3a6534f6b.zip
ICE-4745 - Freeze serialization throws Ice.MemoryLimitException
Diffstat (limited to 'cpp/src/Freeze/ObjectStore.cpp')
-rw-r--r--cpp/src/Freeze/ObjectStore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/Freeze/ObjectStore.cpp b/cpp/src/Freeze/ObjectStore.cpp
index 018b8fd24e3..e1142cd27bd 100644
--- a/cpp/src/Freeze/ObjectStore.cpp
+++ b/cpp/src/Freeze/ObjectStore.cpp
@@ -321,7 +321,7 @@ void
Freeze::ObjectStoreBase::marshal(const Identity& ident, Key& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
- IceInternal::BasicStream stream(instance.get());
+ IceInternal::BasicStream stream(instance.get(), true);
ident.__write(&stream);
vector<Byte>(stream.b.begin(), stream.b.end()).swap(bytes);
}
@@ -330,7 +330,7 @@ void
Freeze::ObjectStoreBase::unmarshal(Identity& ident, const Key& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
- IceInternal::BasicStream stream(instance.get());
+ IceInternal::BasicStream stream(instance.get(), true);
stream.b.resize(bytes.size());
memcpy(&stream.b[0], &bytes[0], bytes.size());
stream.i = stream.b.begin();
@@ -341,7 +341,7 @@ void
Freeze::ObjectStoreBase::marshal(const ObjectRecord& v, Value& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
- IceInternal::BasicStream stream(instance.get());
+ IceInternal::BasicStream stream(instance.get(), true);
stream.startWriteEncaps();
v.__write(&stream);
stream.writePendingObjects();
@@ -353,7 +353,7 @@ void
Freeze::ObjectStoreBase::unmarshal(ObjectRecord& v, const Value& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
- IceInternal::BasicStream stream(instance.get());
+ IceInternal::BasicStream stream(instance.get(), true);
stream.sliceObjects(false);
stream.b.resize(bytes.size());
memcpy(&stream.b[0], &bytes[0], bytes.size());