/README (fd5b575c6ec27a39901eb2595eb795eab1c8fe81) (1466 bytes) (mode 100644) (type blob)

1.) Introduction
This project is a simple memory leak checker.
It is intended for simple (small) C projects
where memory leaks may be a concern. It is
not intended to replace the more powerful
debugging tools out there. Rather, it is
intended to be an easy to use simple check.

2.) Brief overview
It works my defining macros that logs memory
allocation, reallocation and freeing. If all
of the memory allocated is not freed, the
scanner will alert you of that.

3). Simple Howto
To start using this project you would add the line
"#include <mem_check.h>" into your program and replace
the stdlib functions as shown below.
data = (type)calloc(nmemb, size) ---> MEMCHECK_CALLOC(data,type,nmemb,size);
data = (type)malloc(size);     ---> MEMCHECK_MALLOC(data,type,size);
new = realloc(old,size); ---> MEMTYPE_REALLOC(new,type,old,size);
free(data);              ---> MEMCHECK_FREE(data);

Next, add the line "MEMCHECK_INIT();"
in your main function before any memory
handling function calls. Then, add the
line "MEMCHECK_CLOSE();" after your
last memory handling call. Lastly,
add the line MEMCHECK_GLOBAL_VARS;
with your global variables in the
file with your main function (do not
put this macro anywhere else).

If you recompile your program and run it you
should see a new file mem_check.log

If you want to disable the new macro's and
reinstate the stdlib versions, then add the line
#define MEM_CHECK 0
above the line
#include <mem_check.h>
in your source code.


Mode Type Size Ref File
100644 blob 1466 fd5b575c6ec27a39901eb2595eb795eab1c8fe81 README
100644 blob 4554 e0372fdd15b80632dfc7cb606f697dc0cf6d87c4 mem_check_scanner.c
100644 blob 1650 e94eea0e33ef14bb69ed5f2505f6c3c1c84bc52e memcheck.h
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/ORpKTKoVQnFhs/Memory_Check

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/ORpKTKoVQnFhs/Memory_Check

Clone this repository using git:
git clone git://git.rocketgit.com/user/ORpKTKoVQnFhs/Memory_Check

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main