trønderen wrote:Can dotNet run out of memory if the computer has plenty?
Yes, for a variety of reasons. For example, large heap fragmentation. You try to allocate a large object, but there is not a "hole" in the Large Object heap big enough to allocate the object, even though there is technically enough memory to hold it if you add up all the "holes" to get the size of "available" memory.
Quote:If any free (that includes 'Standby' in Resource Monitor terms) memory can be used by dotNet, keeping a window open with Resource Monitor or Task manager would be a very simple way to see if your problem is with memory or with, say, handles.
If you're running into a handle exhaustion problem, if you try to even launch Task Manager, you can end up with it crashing just trying to create its own window.
You are thinking in simple terms of everything. "Free memory" is treated as a single contiguous block in Task Manager, but that's not how memory is really represented. What you're not seeing is "largest available block" of memory.
You also seem to think Windows can track an unlimited number of objects in the Object Manager handle table. It can't. Read up on it here[^].