palloc is a custom implementation of the malloc function in C. This project aims to provide a simple and efficient memory allocation library for educational purposes.
- Custom memory allocation and deallocation
- Simple and easy-to-understand codebase
- Suitable for learning and experimentation
- GCC (GNU Compiler Collection)
To build the project, run the following command:
gcc -o palloc palloc.cInclude the palloc.h header file in your C program and use palloc and pfree functions for memory allocation and deallocation.
#include "palloc.h"
int main() {
int *arr = (int *)palloc(10 * sizeof(int));
// Use the allocated memory
pfree(arr);
return 0;
}Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.
- Inspired by various memory allocation tutorials and resources.