mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Moved header files into their lib directory
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#ifndef MEMORY_MALLOC_H
|
||||
#define MEMORY_MALLOC_H
|
||||
|
||||
#include <memory/virtual.h>
|
||||
#include <memory/physical.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Singly linked list!
|
||||
typedef struct mallocNode_s {
|
||||
uint32_t size;
|
||||
bool free;
|
||||
struct mallocNode_s* next;
|
||||
} mallocNode_t;
|
||||
|
||||
extern mallocNode_t* mallocListHead;
|
||||
extern uint32_t mallocVirtualAddr;
|
||||
extern uint32_t mallocPhysicalAddr;
|
||||
extern uint32_t mallocPages;
|
||||
|
||||
void mallocInit(uint32_t size);
|
||||
void mallocSplit(mallocNode_t* node, uint32_t size);
|
||||
void* mallocNextNode(uint32_t size);
|
||||
void mallocMergeFree();
|
||||
void mallocFree(void* ptr);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user