Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chris-cozy/leakguard-pro
LeakGuard-Pro is a memory leak detection tool designed to help software developers identify and analyze memory leaks in their programs. It provides a mechanism to track memory allocations and deallocations during program execution, allowing you to identify potential memory leaks and their associated sizes.
https://github.com/chris-cozy/leakguard-pro
c memory-leak
Last synced: 1 day ago
JSON representation
LeakGuard-Pro is a memory leak detection tool designed to help software developers identify and analyze memory leaks in their programs. It provides a mechanism to track memory allocations and deallocations during program execution, allowing you to identify potential memory leaks and their associated sizes.
- Host: GitHub
- URL: https://github.com/chris-cozy/leakguard-pro
- Owner: chris-cozy
- Created: 2021-12-01T02:12:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T15:43:28.000Z (over 1 year ago)
- Last Synced: 2023-08-16T18:04:00.312Z (over 1 year ago)
- Topics: c, memory-leak
- Language: C
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **LeakGuard-Pro**
LeakGuard-Pro is a memory leak detection tool designed to help software developers identify and analyze memory leaks in their programs. It provides a mechanism to track memory allocations and deallocations during program execution, allowing you to identify potential memory leaks and their associated sizes.
## **Features**
- **Memory Leak Detection:** LeakGuard-Pro intercepts calls to memory allocation functions (**`malloc`**, **`calloc`**, **`realloc`**) and memory deallocation function (**`free`**) using a dynamic library. It tracks memory allocations and deallocations during program execution.
- **Automatic Leak Reporting:** After the target program completes its execution, LeakGuard-Pro analyzes the memory usage and identifies any memory leaks that occurred during the program's runtime. It calculates the total number of leaks and the cumulative size of memory leaks.
- **Intuitive Usage:** LeakGuard-Pro is designed to be easy to integrate into your development workflow. It uses a dynamic library to intercept memory-related function calls, making it non-intrusive and easy to apply to existing codebases.
- **Flexibility:** LeakGuard-Pro supports a variety of programming languages and platforms, as long as they use standard memory allocation functions. This allows you to use LeakGuard-Pro in a wide range of projects.## **Getting Started**
### **Prerequisites**
- C Compiler (e.g., GCC, Clang)
- Linux or Unix-like environment### **Installation**
1. Clone this repository:
```bash
git clone https://github.com/yourusername/LeakGuard-Pro.git
cd LeakGuard-Pro
```2. Build LeakGuard-Pro:
```bash
make all
```### **Usage**
1. Compile your target program with LeakGuard-Pro's dynamic library:
```bash
gcc -o myprogram myprogram.c -L. -lmemory_shim -ldl
```2. Run your program using the **`leakcount`** executable:
```bash
./leakcount ./myprogram [program_arguments]
```3. After your program finishes execution, LeakGuard-Pro will report any memory leaks detected, including the number of leaks and the cumulative leak size.
### **Example**
```c
#include
#include
int main() {
void *memory_leak = malloc(1024); // This allocation will cause a leakprintf("Hello, LeakGuard-Pro!\n");
return 0;
}
```### **Cleaning Up**
To clean up compiled files, run:
```bash
make clean
```## **Contributing**
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or a pull request.
## **License**
This project is licensed under the MIT License - see the **[LICENSE](https://opensource.org/license/mit/)** file for details.
## **Acknowledgments**
LeakGuard-Pro was inspired by the need for an easy-to-use memory leak detection tool for software developers. It aims to simplify the process of identifying memory leaks in various projects.
## **Contact**
For questions, suggestions, or support, please contact [[email protected]](mailto:[email protected]).