Skip to content

Melkor-1/liballoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

liballoc - Custom Memory Allocation Library

License

liballoc is a memory allocation library written in C that provides custom memory allocation and management functionality using a singly linked list data structure.

Features

  • Allocate and manage memory using a singly linked list.
  • Support for malloc, calloc, realloc, and free functions.
  • Thread-safe memory allocation using mutex locks.
  • Built-in overflow and error handling.

Usage

  1. Include the liballoc.h header file in your source code:
#include "liballoc.h"

Link your project with the compiled static or dynamic library.

Building the Library

  1. Clone this repository:
git clone https://github.com/your-username/liballoc.git
cd liballoc
  1. Build the library:
make

This will compile the library and generate both static (liballoc_$(ARCH)-$(OS).a) and dynamic (liballoc_$(ARCH)-$(OS).so) versions in the bin directory.

Contributing

Contributions are welcome! If you find any issues or want to add new features or improvements, feel free to open a pull request.

Acknowledgements

The core concepts and code structure of this library were adapted from the tutorial by Arjun Sreedharan: Memory Allocators 101 - Write a simple memory allocator.

About

A Memory Allocator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published