Udemy

System C Project - Write a Garbage Collector from Scratch

Enroll Now
  • 2,551 Students
  • Updated 1/2022
4.4
(189 Ratings)
CTgoodjobs selects quality courses to enhance professionals' competitiveness. By purchasing courses through links on our site, we may receive an affiliate commission.

Course Information

Registration period
Year-round Recruitment
Course Level
Study Mode
Duration
3 Hour(s) 35 Minute(s)
Language
English
Rating
4.4
(189 Ratings)
2 views

Course Overview

System C Project - Write a Garbage Collector from Scratch

Linux/Windows System Programming - C Project, Heap Memory Leak detection tool, Operating System, Memory Management

I was asked this question in Amazon/Google Interviews :

1. How would you design a garbage collector for C programs?

2. If designing a garbage collector was that easy, why we don’t have it integrate with C programming language already ??

Complete this course to get the answers. :p


This course is a Project-based course and involved coding in C at every stage of the course.

Mention this project on your Resume with all proud.


This is a C Project (open for extension for C++) in which you will learn and write a library that catches the memory leaks, if any, by the application. In this project, I have explained step by step how to design and implement a garbage collector library called MLD (Memory Leak Detector) which when integrated to your application will provide the facility to catch leaked objects and report them. MLD library will be the generic library and has the ability to parse any application's data structures and manipulate them.

The Project is explained in 3 phases.


Note: This is a course that require a little bit of analysis power, beginner students can also learn much from this course that how you can create a program which can parse its own objects and structures. This technique is used to create many other projects out of which one is Memory leak detection.

Advice: Class of Students who needs "spoon-feeding", pls refrain from enrolling in project-based courses.


Key highlights :

  • Since the advent of C/C++ Programming language, Memory management is one of the responsibilities which the developer has to deal with

  • C/C++ Softwares often suffers from Two Memory related Problems :

    • Memory corruption

    • Memory leak

  • Unlike Java, C/C++ does not have the luxury for automatic garbage collection

  • Java does not allow programmer to access the physical memory directly, but C/C++ does, not does java expose pointers directly to the developer/coder. Therefore Java applications do not suffer from Memory corruption either, but C/C++ does

  • In this course, we will design and implement Memory Leak Detector (MLD) tool for C programs, easily extensible to C++ as well


Some Students have requested to provide a formal description of this project. For Students who want to mention this project in their resume, or doing this project as their OS project - you can mention the following title and abstract of this project as below :


Title: "Design and Implementation of Java-like Garbage Collector for C Programs".
In this project, we try to implement a garbage collector for C programs which work on the principle of reachability of objects to detect memory leaks. Through this project, we understand the limitation of such a garbage collector for C like programming languages (which have direct access to underlying memory addresses, unlike Java/python) and analyze its limitations and cost for being an inbuilt feature of C-like language.


Course Content

  • 8 section(s)
  • 43 lecture(s)
  • Section 1 Introduction
  • Section 2 Introduction to the MLD Project
  • Section 3 Phase 1 : MLD Structure Database
  • Section 4 Phase 2 : MLD Object Database
  • Section 5 Phase 3 : Memory Leak Detection Algorithm
  • Section 6 Overall Analysis of the Project
  • Section 7 Extra : Building Project Using Makefile
  • Section 8 Bonus !

What You’ll Learn

  • Developing a C/C++ Library, Integrating a Library with Application, How to implement Memory Leak Detector tool, How to track the Objects malloc'd by the application

Reviews

  • M
    Mike Harris
    5.0

    If you know basic data structures like link list and good at pointers, arrays. This course is recommended to get better insight into how data is stored and managed especially on the HEAP. If you plan on writing more complex applications in the future this course will help you better organize how data is stored beyond basic malloc/free.

  • A
    Ahmad Saleh
    5.0

    As usual, outstanding course provided from Abhishek you will build "garbage collector" in C step by step in nice way By the end of course you will have the following knowledge: 1. Design garbage collector 2. How to detect leaked data 3. Improve your proficiency in C also, the instructor (Abhishek) always respond to all questions which is very good (for all courses) very recommended course

  • A
    Anonymized User
    5.0

    Great course! I would recommend to provide more upfront material describing the problem to be solved. I have written wrappers around malloc/free that track where things are allocated (file, line) and not freed at the end of of the program (or at any time during) - but the memory model was strictly hierarchical - no cycles. So the begging of the source, I'm thinking "why so much effort - this could be much simpler!" Now that I see the problem you are addressing !!! Wow. Good course. I like the way that you are not going line-by-line over your solution, but providing hints and highlights! A++

  • L
    Lloyd Malecaut
    5.0

    Exceptional course, would leave 6 stars if I could! If you have completed introductory+intermediate courses on C programming, and you are comfortable with data structures and algorithms in C, then you are well primed to undertake this project. I recently presented this project at an assessment centre, highlighting the differences between my approach to some areas versus Abisheks (i.e iterative graph traversal versus recursive graph traversal, algorithm to update root objects etc..) and I was given a job offer. So thank you Abishek! If you are considering taking this course I would honestly suggest that you ignore all negative reviews. They are left by people who are either at a level too beginner to appreciate the course, or people who simply refuse to see the effort that went into its development. I highly recommend Abishek as an instructor and I will be enrolling in every single one of his C courses!

Start FollowingSee all

We use cookies to enhance your experience on our website. Please read and confirm your agreement to our Privacy Policy and Terms and Conditions before continue to browse our website.

Read and Agreed