I'm developing a game on WPF. But as I launch the application, it freezes and the new RAM is not allocated. I 'm using .NET 6 and WPF. I think in the app .NET is running out of heap memory.
My application freezes in 120 MB of RAM when I have 8 GB of it.
Can you tell me how to increase the heap size in the WPF application in .NET 6.
The code is in: https://github.com/DmitriySidyakin/Chess/tree/Chess-0.1.2-with-Computer-Player-development
If you want to compile, you will download the .NET 6 from: https://dotnet.microsoft.com/en-us/download/dotnet/6.0
The program freezes if you select a Computer player in the settings (New Game) and it makes a move.
The accompanying project "GraphAlgorithms" can be downloaded from the repository: https://github.com/DmitriySidyakin/Graph
In "Chess.ComputerPlayer" project, in the file "FiveStepPlayer.cs", in line 150, you can specify the depth of the graph traversal by 0, and it will not be freezed if "int deep" specify 0. But the depth of search in the graph is needed here to improve the quality of AI.
If int deep is set to 5, I have a stack overflow. I also wanted to find out how to programmatically increase the stack or in the project parameters.
The question is, how to programmatically manage the Application Domain in the CLR to increase its stack and heap?