Nugget
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations
alloc.c File Reference
#include "openbios/kernel/alloc.h"
#include <stddef.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for alloc.c:

Classes

struct  empty_block_
 
struct  allocated_block_
 

Macros

#define ALIGN_MASK   ((2 * sizeof(void *)) - 1)
 
#define ALIGN_TO(x)   (((uintptr_t)(x) + ALIGN_MASK) & ~ALIGN_MASK)
 

Typedefs

typedef struct empty_block_ empty_block
 
typedef struct allocated_block_ allocated_block
 

Enumerations

enum  heap { HEAP_USER , HEAP_KERNEL }
 

Macro Definition Documentation

◆ ALIGN_MASK

#define ALIGN_MASK   ((2 * sizeof(void *)) - 1)

◆ ALIGN_TO

#define ALIGN_TO (   x)    (((uintptr_t)(x) + ALIGN_MASK) & ~ALIGN_MASK)

Typedef Documentation

◆ allocated_block

◆ empty_block

Enumeration Type Documentation

◆ heap

enum heap
Enumerator
HEAP_USER 
HEAP_KERNEL