c# - OutOfMemoryException with gcAllowVeryLargeObjects -


I am using a binary certifiers in which very large things have been detected. I have a 8Gb RAM supported by 12GG swap and I hope that if out of serialization, we are getting an out-of-my-camera expression (it is possible that the graph can be closer to 2 GB or more).

However, when I use the GCLVallerject, it is not better than that, I still get the same exception and I am definitely working on things which in memory (at least swap With)

Can I have the same feature set to get it, but can it result?

There is nothing special about my serialization code:

  public static byte [] serialize (this object o) {var ms = new memorystream (); var bf = new BinaryFormatter (); bf.Serialize (MS, O); Ms.osition = 0; Return to MS. ToArray (); }   

The item I am serial involves arrays of objects including ones themselves, etc. But the whole graph is not "big" (the result of this indexing data The source, which is already in the shape of approximately 1 GB).

This is not due to GC fragmentation (covering a large pile does not help).

By default, AnyCPU runs as 32 bit process on both x86 and x64 OS. So even on the x64 OS set to gcAllowVeryLargeObjects goes to the 4 GB limit (2 GB x 86).

Uncheck the "32 bit" option on properties - & gt; "Build" tab.

Details and history can be found in the following reply:

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -