In my C# app I use gcAllowVeryLargeObjects
because I am doing image processing with large datasets, resulting in extensive RAM usage. Now I want to write some UnitTests and I am running into the same situations I had without gcAllowVeryLargeObjects
.
My setup is about reading JSON files containing large 1D byte arrays using Newtonsoft.Json. The initial error I had, was a classic ObjectOutOfMemoryException
when deserializing the file. The ExceptionMessage was: Array Dimensions exceeded supported Range.
I got that managed using <gcAllowVeryLargeObjects enabled="true"/>
and now Newtonsoft.Json does not have any issues. But for the UnitTest I don't have any clue how to set this runtime parameter. Hopefully one of you dudes has an idea.