Re: GC, Windows or Design problem?




"Tamir Khason" <tamir-NOSPAM@xxxxxxxxxxxxxxxxx> wrote in message
news:%23YNVxUUXFHA.1152@xxxxxxxxxxxxxxxxxxxxxxx
>> 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.



.



Relevant Pages

  • Re: share a structure array containing multidimensional char array
    ... When you want to deserialize/serialize a managed type to/from unmanaged memory, you have to use the same serializer/deserializer at both sides, that means you also need to use .NET to serialize/deserialize at the C++ side. ... Besides the structures, you also have to store the number of structures serialized to the shared memory buffer and the size of the individual structure members, without this info it's impossible for the reader to determine the number of array members and the size of the structure members. ... HANDLE hKernel; ... > Mapping a datastructure, whatever it's type, in a serialization. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: share a structure array containing multidimensional char array
    ... memory, you have to use the same serializer/deserializer at both sides, that ... Deserialization Error: ... C++ code doesnot make any serialization. ... instance as an int value at the start of the MM segment. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: delegate question
    ... information of the method that the delegate is attached to. ... the server, and never get to you (a copy of your client will be sent to the ... event is remoted back to the client, ... the> client-runtime throws serialization exceptions of classes that are not> relevant for my client. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Garbage collector behavior
    ... Chris Tacke, Embedded MVP ... added to the list of finaliser to execute, ... actually need more than one collection to free it from the managed heap. ... there is more thant 1 MB of free memory in the heap, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Growing Working Set Size on GUI App
    ... We use some tools to detect and fix memory leaks, ... the managed heap size was ... >> working set, ...
    (microsoft.public.dotnet.framework.performance)