matos/core/alloc.h
Mathieu Maret 3b97d0307d Style: harmonize formatting
Thanks to: "clang-format -i -style=file **/*.{c,h}"
2020-04-27 00:14:51 +02:00

24 lines
425 B
C

#pragma once
#include "paging.h"
#include "stdarg.h"
struct slabEntry {
vaddr_t page;
void *freeEl;
char full;
struct slabEntry *next;
struct slabEntry *prev;
};
struct slabDesc {
struct slabEntry slab;
size_t size;
struct slabDesc *next;
struct slabDesc *prev;
};
int allocInit(void);
int allocBookSlab(size_t size, int selfContained);
void *malloc(size_t size);
void free(void *ptr);