implementation of memory allocation functions in c (malloc , free , realloc , calloc) using unix syscalls
About this project
memalloc A custom implementation of memory allocation functions in C using the sbrk Unix kernel syscall. This project provides a robust and educational approach to understanding memory management by implementing malloc, free, realloc, and calloc from scratch. It also includes utilities for debugging and demonstrates usage in various data structures. Features Custom Memory Allocation: Implements memory allocation using sbrk. Thread-Safe Operations: Ensures safe usage in multithreaded environments with pthreadmutext. Memory Management: Supports splitting and coalescing memory blocks to reduce fragmentation. Debugging Utilities: Provides functions to print memory statistics and layout. Standard Functions: Implements malloc, free, realloc, and calloc. Future Enhancements Improved Fragmentation Handling: Reduce memory fragmentation for better performance. Optimized sbrk Usage: Enhance performance by minimizing system calls. Advanced Debugging Tools: Add visualization tools for memory layout and usage. Prerequisites Make: Version 4.4.1 or higher. GCC: Version 14.1.1 or higher. Unix-based System: The project uses sbrk, which is not supported on Windows. Build and Run
From the project README on
GitHub
- Stars
- 11
- Forks
- 0
- Last push
- 6 Apr 2025
Add this badge to your README
Show that your project is listed on Made in Algeria.
[](https://www.madeinalgeria.dev/projects/memalloc)