开发者

.net application causing memory fragmentation

开发者 https://www.devze.com 2023-03-08 14:40 出处:网络
I understand that only way a .NET application ( that does not use any unamanged code) can cause memory fragmentation is by large object heap. Are there any ways of detecting if your a开发者_StackOverf

I understand that only way a .NET application ( that does not use any unamanged code) can cause memory fragmentation is by large object heap. Are there any ways of detecting if your a开发者_StackOverflowpplication is fragmenting memory and anyways of avoiding it?


  1. Keep objects small.
  2. Keep objects short-lived.
  3. Trust the GC

1 and 2 might be tough in practice but honestly, you'd be talking about BIG objects and the GC really does a good job with all this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号