Can I configure the managed heap size for a x86 application? #78128
Unanswered
glen-nicol
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I want to use dotnet and Avalonia/WPF to display a nicer UI around a window that is drawn to by a native application (basically a game). I am well aware of the airspace issue with the different rendering systems. But the problem I am running into now is virtual memory space / fragmentation. When I power up the game by loading all its DLL's I get out of memory errors after a couple of those load. I have tracked that down using VMMap to what I think is just the fact that the dotnet runtime reserves a ton of the process's virtual memory for itself. Pausing on the first instruction for Main() shows the largest free block of memory left is only 1.1GB. Sadly my native application requires more than that when run by itself (1.3GB). It's a 32bit application that can't be upgraded to 64bit due to some other external requirements. I imagine that would solve the problem outright but alas the easy way never seems possible.
I found the runtime config options that purport to control the GC heaps. I tried combinations of
Hoping they might work since the docs say they work on 64 bit computers (should that say 64 bit programs?)
Running .net 6 x86 on windows.
Am I barking up the wrong tree in terms of my diagnosis? Is there something else I can do to give the native portion of my process more of the small 32bit address space?
related SO questions
limiting-the-maximum-memory-used-by-a-c-sharp-program
should-we-use-workstation-garbage-collection-or-server-garbage-collection
Beta Was this translation helpful? Give feedback.
All reactions