"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Are you trying to tell me that the object (the collection) is bigger than
2GB (in memory) on the server
Yes, this is collection, but I do not know it's size. It produces ~2.4Gb
file using binary serialization with 100% managed C#
What formatter did you use to serialize?
As mentioned earlier: Binary
How did you calculate/determined the object size? (you said object > 2GB
and
I do not! I know only serialized object (file) size
Well as I said, don't assume that you will be able to de-serialize such
large object, it's quite simple you only have 2GB virtual address space on
Win32, part of this is taken by the code (runtime and yours) part is
internal process/thread administration, the remainder is up to be used by
the managed heap to store objects, say your object (like all objects) needs
1.2 GB of object space to be able to de-serialize the collection, but your
program also needs the data to be read from the persisted file before it can
reconstruct the object graph, this amount of memory (don't know how large it
is , but certainly larger than the largest object in the collection) needed
to read the file data (unmanaged heap) is simply not available, or the
managed heap cannot grow to accommodate the collection.
Now, why did it work on the server? Simply you were able to create the
collection of that size, during serialization, the GC heap could shrink
while the object data was persisting/serializing, this is not possible on
the de-serializing side.
Simply put your object is too large for 32 bit sorry, you have to cut it in
peaces.
Willy.