Skip to content

feelerx/autofreer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

AutoFreer

Automatic memory management library for the C programming language. AutoFreer provides automatic deallocation of dynamically allocated memory through a Dynamic Link Library (DLL) that can be linked to your C projects.

Overview

AutoFreer simplifies memory management in C by automatically freeing allocated memory, reducing the risk of memory leaks and eliminating the need for manual memory deallocation in many cases.

Features

  • Automatic memory deallocation for dynamically allocated memory
  • Easy integration via DLL linking
  • Built-in functions for simplified memory management
  • Compatible with standard C projects

Requirements

  • C compiler with DLL support
  • Windows environment (for DLL usage)
  • Visual Studio (recommended for linking)

Installation

Clone the repository:

git clone https://github.com/feelerx/autofreer.git
cd autofreer

Usage

Linking the DLL

To use AutoFreer in your C project, you need to link the provided DLL to your C file.

Using Visual Studio

Follow the official Microsoft tutorial for linking DLLs: Creating and Using a Dynamic Link Library (C++)

Basic Steps

  1. Include the AutoFreer header file in your C source code
  2. Link the AutoFreer DLL to your project
  3. Use the built-in functions provided by the library

Example

#include "autofreer.h"

int main() {
    // Use AutoFreer functions for automatic memory management
    // Your code here
    
    return 0;
}

How It Works

AutoFreer manages dynamically allocated memory by tracking allocations and automatically freeing them when they are no longer needed, helping to prevent memory leaks in C programs.

Built-in Functions

The library provides built-in functions for memory management. Refer to the header file and documentation for detailed function signatures and usage examples.

Benefits

  • Reduces manual memory management overhead
  • Helps prevent memory leaks
  • Simplifies C code by removing explicit free() calls
  • Improves code maintainability

Compatibility

  • Primarily designed for Windows environments
  • Compatible with Visual Studio and other C compilers that support DLL linking

Contributing

Contributions are welcome. Please feel free to submit issues and pull requests to improve the library.

Support

For issues, questions, or contributions, please visit the GitHub repository.


Note: Ensure proper testing when integrating automatic memory management into existing projects. While AutoFreer simplifies memory management, understanding the underlying memory allocation patterns in your application is still important.

About

Automatic allocated Memory freer for the C programming Language when the relevant DLL created by me is linked to the C file. Link the DLL to your C file and use the inbuilt functions defined in it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages