Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Effective .NET Memory Management

You're reading from   Effective .NET Memory Management Build memory-efficient cross-platform applications using .NET Core

Arrow left icon
Product type Paperback
Published in Jul 2024
Publisher Packt
ISBN-13 9781835461044
Length 270 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Trevoir Williams Trevoir Williams
Author Profile Icon Trevoir Williams
Trevoir Williams
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Chapter 1: Memory Management Fundamentals 2. Chapter 2: Object Lifetimes and Garbage Collection FREE CHAPTER 3. Chapter 3: Memory Allocation and Data Structures 4. Chapter 4: Memory Leaks and Resource Management 5. Chapter 5: Advanced Memory Management Techniques 6. Chapter 6: Memory Profiling and Optimization 7. Chapter 7: Low-Level Programming 8. Chapter 8: Performance Considerations and Best Practices 9. Chapter 9: Final Thoughts
10. Index 11. Other Books You May Enjoy

Memory Management Fundamentals

Memory management refers to controlling and coordinating a computer’s memory. Using proper memory management techniques, we can ensure that memory blocks are appropriately allocated across different processes and applications running in the operating system (OS).

An OS facilitates the interaction between applications and a computer’s hardware, enabling software applications to interface with a computer’s hardware and overseeing the management of a system’s hardware and software resources.

OSs orchestrate how memory is allocated across several processes and how space is moved between the main memory and the device’s disk during executions. The memory comprises blocks that are tracked during usage and freed after processes complete their operation.

While you may not need to understand all the inner workings of an OS and how it interacts with applications and hardware, it is essential to know how to write applications that make the best use of the facilities that OSs make available to us, so that we can author efficient applications.

In this chapter, we will explore the inner concepts of memory management and begin to explore, at a high level, the following topics:

  • The fundamentals of memory management
  • How garbage collection works
  • The pros and cons of memory management
  • The effects of memory management on application performance

By the end of this chapter, you should better appreciate the thought process that goes into ensuring that applications make the best use of memory, and you will understand the moving parts of memory allocation and deallocation.

Let’s begin with an overview of how memory management works.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime