10#ifndef MAXOS_SYSTEM_MEMORYMANAGEMENT_H
11#define MAXOS_SYSTEM_MEMORYMANAGEMENT_H
16#include <libcommon/assert.h>
20#include <memory/allocator/bump.h>
21#include <system/multiboot.h>
23namespace MaxOS::memory {
35 void* allocate_extra_space(
size_t requested_size,
size_t& actual_size)
final;
61 static void*
malloc(
size_t size);
62 static void free(
void* pointer);
65 static void*
kmalloc(
size_t size);
66 static void kfree(
void* pointer);
Basic doubly linked list bump memory manager.
static void switch_active_memory_manager(BumpMemoryManager *manager)
Switches the active memory manager.
VirtualMemoryManager * vmm()
Handles memory allocation and deallocation.
static void free(void *pointer)
Frees a block of memory using the current memory manager.
static MemoryManager * s_kernel_memory_manager
The memory manager for any kernel processes and all kernel allocations.
static void * malloc(size_t size)
Allocates a block of memory in the current USERSPACE heap.
static void * kmalloc(size_t size)
Allocates a block of memory in the KERNEL space.
static void kfree(void *pointer)
Frees a block of memory using the kernel memory manager.
~MemoryManager()
Destroy the Memory Manager object, frees the VMM if not the kernel memory manager.
Manages the virtual memory of the system and provides functions to allocate and free memory in the vi...
Basic doubly linked list bump memory allocator.
Defines a VirtualMemoryManager class for managing virtual memory allocation and mapping to physical m...