This project implements a custom memory management system in C, designed to provide various memory allocation strategies such as best fit, worst fit, first fit, next fit, and buddy system. It includes functions for initializing the memory region, allocating and freeing memory, and utilities for debugging memory state.
The system uses a linked list to manage memory blocks within a pre-allocated memory region. Each block contains metadata for managing the allocation and deallocation processes. The allocation algorithms can be selected during the initialization phase, supporting flexible memory management strategies tailored to specific application needs.
- A Linux environment or a similar system with support for POSIX APIs.
- GCC compiler for building the project.
- Basic understanding of memory management concepts and C programming.
- Clone the repository to your local machine.
- Ensure you have GCC installed by running
gcc --version
. Install GCC if it's not installed. - Navigate to the project directory where the source code is located.
- To compile the program, use the following commands:
gcc -o umem umem.c
- To compile the project, run
make
in the terminal within the project directory. This will create the executable namedmain
as specified in the Makefile. - To execute the program, run
./main
in the terminal. This command will run the compiled program.
Timothy Hwang