What is Garbage Collection? 🔗Unlike low-level languages like C, where memory management (allocation and freeing of memory) is handled by developers, high-level languages like JavaScript manage memory automatically. JavaScript abstracts the key concepts of allocating and freeing memory by implementing various algorithms.
The process of identifying memory that has been allocated but is no longer required by the program, referred to as garbage, is known as garbage collection.
Garbage Collection Algorithms 🔗There are many garbage collection algorithms, such as Mark and Sweep, Reference Counting, Generational Garbage Collection, and Mark-Compact, among others.
Introduction 🔗When building and running code on a production server, it’s crucial to be aware of memory usage, CPU cycles, and other key performance indicators (KPIs) like the time complexity and duration of function calls. Software engineers often obtain and analyze these KPIs to optimize running programs and debug issues, such as memory leaks and CPU utilization, which are difficult to catch in a development environment. This activity is called profiling.
This is not my usual technical/CSE adjacent post. My articles are mostly tech-related, but I wanted to discuss something different today.
For the past few months, precisely six, I have not been writing anything. I re-did my Svelte SPA site and turned it into this Hugo based SSG, removing the clutter to focus on writing.
But as you see, I have not written anything since last year. Why?
Firstly, in the past quarter, I switched jobs, and the transitional period comes with a lot of uncertainty in routine.