mem: implement buddy allocator

This commit is contained in:
Michael Shaw 2023-04-12 13:58:22 -04:00
commit 4f4af0946d
6 changed files with 245 additions and 14 deletions

13
include/math.h Normal file
View file

@ -0,0 +1,13 @@
#ifndef _MATH_H_
#define _MATH_H_
#include <stdint.h>
#include <stddef.h>
size_t log2(size_t n);
size_t npow2(size_t n);
void bitmap_set(char *bitmap, size_t n);
void bitmap_clear(char *bitmap, size_t n);
uint8_t bitmap_get(char *bitmap, size_t n);
#endif /* _MATH_H_ */