after a lot of searching I have unfortunately not found a solution for this problem under .Net 6.0.
My application is running on a x64 Linux server and the dictionary contains just 3,192,915 elements and I get the OutOfMemoryException.
I have tried gcAllowVeryLargeObjects
but this seems to be ignored.
x.runtimeconfig.json: `
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Reflection.NullabilityInfoContext.IsSupported": true
},
"gcAllowVeryLargeObjects": {
"enabled": true
}
}
}
`