Move memory_manager and assert into kutil.

This commit is contained in:
Justin C. Miller
2018-05-08 01:11:03 -07:00
parent 712cd69242
commit 0f54630725
19 changed files with 140 additions and 84 deletions

17
src/kernel/kalloc.h Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
/// \file kalloc.h
/// Definitions of kalloc() and kfree()
#include <stddef.h>
/// Allocate kernel space memory.
/// \arg length The amount of memory to allocate, in bytes
/// \returns A pointer to the allocated memory, or nullptr if
/// allocation failed.
inline void * kalloc(size_t length);
/// Free kernel space memory.
/// \arg p The pointer to free
inline void kfree(void *p);