AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
buddy.h
Go to the documentation of this file.
1
#ifndef _DS_BUDDY_H
2
#define _DS_BUDDY_H
3
4
#include <
core/system.h
>
5
#include <
ds/bitmap.h
>
6
9
struct
buddy
{
10
size_t
first_free_idx
;
/* where to start looking for a free block */
11
size_t
usable
;
/* how many of its blocks are free */
12
struct
bitmap
bitmap
;
13
};
14
15
/* The index of a block's buddy: the other half of the block they split
16
* from. */
17
#define BUDDY_IDX(idx) ((idx) ^ 0x1)
18
19
#endif
/* ! _DS_BUDDY_H */
bitmap.h
system.h
buddy
One order of a buddy allocator's zone (mm/buddy.c): a bitmap of its blocks, a set bit for a block tha...
Definition
buddy.h:9
buddy::usable
size_t usable
Definition
buddy.h:11
buddy::bitmap
struct bitmap bitmap
Definition
buddy.h:12
buddy::first_free_idx
size_t first_free_idx
Definition
buddy.h:10
kernel
include
ds
buddy.h
Generated by
1.18.0