Wrote a short program to help identify memory leaks.
- clone/download the two files
- Put the "jfj.c" in the directory of the program you want to test.
- "jfj.c" can go into your
srcs/
- "jfj.h" can go into your
includes/
- "jfj.c" can go into your
- include "jfj.h" in your primary .h file.
- If you are using libft, go into jfj.h and uncomment the
#include "libft/libft.h"
- uncomment the relevant functions that are mallocing. If you do not know just run jfj as is and it should tell you which ft_functions use malloc.
- Add jfj.c or jfj.o to your Makefile
- Add
leaks();
to the end of the main that is running the program. - make and execute.
- clone the repo
- run
make
- run
./test
- Edit
test.c
as you need
malloc
ft_memalloc
Find me on 42slack: delin