Why does .NET reserve so much memory for my application?

When I launch my application, in the profiler I see that it uses about 80 MB of memory (total bytes, performance counter). But when I look at the size of the allocated memory, it is more than 400 MB!

So my question is: why does .NET reserve so much memory for my application? This is normal?

+5
source share
4 answers

you must read The Secret of Memory . Some time ago I had similar questions, and I stopped asking myself after reading this. I read other sources, but I can’t find now, use the keywords "unreasonable selection of Windows OS". In a nutshell, the OS provides more than what your application requires depending on physically available memory resources for example. if you use your application on two machines with different RAM, you can guarantee that both of these machines will have different memory allocations.

+6
source

, , , . , ; , "" ( - ) .

- ​​ , .

, , , . , , , , .

, , , List<T>, , , , . OS .

+1

"" , "" . , .

, , - . , .

, " " - (.. ), ( ) , RAM .

0

, . , Windows ( ) , " " - , , . , DRAM, . .

- . ; , , "" , .

.NET, , , . , , ( , CLR GC , ), , - .

0

All Articles