Pro .NET Memory Management

For Better Code, Performance, and Scalability

  • Konrad Kokosa

Table of contents

  1. Front Matter
    Pages i-xxxi
  2. Konrad Kokosa
    Pages 1-63
  3. Konrad Kokosa
    Pages 65-125
  4. Konrad Kokosa
    Pages 127-231
  5. Konrad Kokosa
    Pages 233-338
  6. Konrad Kokosa
    Pages 339-409
  7. Konrad Kokosa
    Pages 411-505
  8. Konrad Kokosa
    Pages 507-574
  9. Konrad Kokosa
    Pages 575-622
  10. Konrad Kokosa
    Pages 623-658
  11. Konrad Kokosa
    Pages 659-685
  12. Konrad Kokosa
    Pages 687-742
  13. Konrad Kokosa
    Pages 743-819
  14. Konrad Kokosa
    Pages 821-916
  15. Konrad Kokosa
    Pages 917-995
  16. Konrad Kokosa
    Pages 997-1047
  17. Back Matter
    Pages 1049-1072

About this book


Understand .NET memory management internal workings, pitfalls, and techniques in order to effectively avoid a wide range of performance and scalability problems in your software. Despite automatic memory management in .NET, there are many advantages to be found in understanding how .NET memory works and how you can best write software that interacts with it efficiently and effectively. Pro .NET Memory Management is your comprehensive guide to writing better software by understanding and working with memory management in .NET.

What You'll Learn:
  • Understand the theoretical underpinnings of automatic memory management
  • Take a deep dive into every aspect of .NET memory management, including detailed coverage of garbage collection (GC) implementation, that would otherwise take years of experience to acquire
  • Get practical advice on how this knowledge can be applied in real-world software development
  • Use practical knowledge of tools related to .NET memory management to diagnose various memory-related issues
  • Explore various aspects of advanced memory management, including use of Span and Memory types
This book is for .NET developers, solution architects, and performance engineers.

Thoroughly vetted by the .NET Team at Microsoft, this book contains 25 valuable troubleshooting scenarios designed to help diagnose challenging memory problems. Readers will also benefit from a multitude of .NET memory management “rules” to live by that introduce methods for writing memory-aware code and the means for avoiding common, destructive pitfalls. 

Konrad Kokosa is an experienced software designer, developer, and Microsoft MVP specializing in Microsoft technologies, but curious about everything else. A programmer for more than a decade, he has a passion for solving performance problems, speeding up applications, and resolving all types of architectural puzzles in .NET. Konrad is an independent consultant, and an active member of the community, blogging, speaking, and training. He is co-founder of


C# Microsoft garbage collection allocator mutator stack heap

Authors and affiliations

  • Konrad Kokosa
    • 1
  1. 1.WarsawPoland

Bibliographic information

Industry Sectors
Chemical Manufacturing
Finance, Business & Banking
IT & Software
Consumer Packaged Goods
Energy, Utilities & Environment