mem: implement buddy allocator
This commit is contained in:
parent
fe93196a01
commit
4f4af0946d
6 changed files with 245 additions and 14 deletions
13
include/math.h
Normal file
13
include/math.h
Normal 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_ */
|
||||
Loading…
Reference in a new issue