https://github.com/hacke-rc/mallocx
a buddy-allocator for heap
https://github.com/hacke-rc/mallocx
allocator buddy-allocator heap
Last synced: about 1 month ago
JSON representation
a buddy-allocator for heap
- Host: GitHub
- URL: https://github.com/hacke-rc/mallocx
- Owner: HACKE-RC
- Created: 2024-02-11T12:09:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-17T16:25:24.000Z (about 1 year ago)
- Last Synced: 2025-04-06T07:44:11.848Z (about 1 month ago)
- Topics: allocator, buddy-allocator, heap
- Language: C++
- Homepage:
- Size: 39.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mallocx
A freestanding buddy heap allocator, preferable for embedded systems / kernel## Usage
To use it go to [this](https://github.com/HACKE-RC/mallocx/blob/4dbe4f4e229d0a3c98fcaa2db241d2f9236e0045/malloc.cpp#L9) line and change memmap with however you choose to get your heap memory from. Also make sure to remove the `#include sys/mman.h` from the top [line](https://github.com/HACKE-RC/mallocx/blob/4dbe4f4e229d0a3c98fcaa2db241d2f9236e0045/malloc.cpp#L4).## Freestanding
If you don't have your own string library that can do memset and memcpy then there's a simple header file which has these two headers already included in the `src/lib` folders you don't have to worry about anything.