Reader small image

You're reading from  C# 7 and .NET Core 2.0 High Performance

Product typeBook
Published inApr 2018
Reading LevelBeginner
Publisher
ISBN-139781788470049
Edition1st Edition
Languages
Right arrow
Author (1)
Ovais Mehboob Ahmed Khan
Ovais Mehboob Ahmed Khan
author image
Ovais Mehboob Ahmed Khan

Ovais Mehboob Ahmed Khan is a seasoned programmer and solution architect with nearly 20 years of experience in software development, consultancy, and solution architecture. He has worked with various clients across the world and is currently working as a senior customer engineer at Microsoft. He specializes mainly in application development using .NET and OSS technologies, Microsoft Azure, and DevOps. He is a prolific writer who has written several books and articles on various technologies. He really enjoys talking about technology and has given a number of technical sessions around the world.
Read more about Ovais Mehboob Ahmed Khan

Right arrow

Memory allocation process overview

Memory allocation is the process of allocating objects in memory when the application is running. It is done by the Common Language Runtime (CLR). When the object is initialized (using a new keyword), the GC checks whether the generation reaches the threshold and performs garbage collection. This means that when the system memory reaches its limit, the GC is invoked. When an application runs, the GC register itself receives an event notification about the system memory, and when the system reaches its particular limit, it invokes garbage collection.

On the other hand, we can also programmatically invoke the GC using the GC.Collect method. However, as the GC is a highly fine-tuned algorithm and automatically behaves as per memory allocation patterns, calling it explicitly can affect performance, and so it is strongly recommended that you don&apos...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
C# 7 and .NET Core 2.0 High Performance
Published in: Apr 2018Publisher: ISBN-13: 9781788470049

Author (1)

author image
Ovais Mehboob Ahmed Khan

Ovais Mehboob Ahmed Khan is a seasoned programmer and solution architect with nearly 20 years of experience in software development, consultancy, and solution architecture. He has worked with various clients across the world and is currently working as a senior customer engineer at Microsoft. He specializes mainly in application development using .NET and OSS technologies, Microsoft Azure, and DevOps. He is a prolific writer who has written several books and articles on various technologies. He really enjoys talking about technology and has given a number of technical sessions around the world.
Read more about Ovais Mehboob Ahmed Khan