Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.29 KB

README.md

File metadata and controls

36 lines (23 loc) · 1.29 KB

Simple memory leak checker for 42 students

This repo contains some simple but very helpful tools for debugging your code.

Current debug functions

check_leaks()

NOW NORMINETTE SAFE!

How to use:

  1. Run make to create a library of the debug functions
  2. Now you can link the library in your Makefile
  3. And you can add check_leaks(); to the end of your main

Example output when a memory leak is caught:

Example output when there is a memory leak

Here there is a clear memory leak that starts in the "get_commands" function (either memory that doesn't get free'd at the end or something else ...)

Some helpful links to practice the fine art of RTFM

  1. Ever wondered what the difference is between SEGFAULT and BUS error?

    SEGFAULT VS BUS

  2. A descriptive wiki about memory management:

    Memory Management

Halp I still don't know how to debug my code!

man RTFM

Shoutouts