#include <stddef.h>#include <stdint.h>#include "kernel/mm/kalloc.h"#include "kernel/mm/frame.h"#include "kernel/panic.h"#include "kernel/mm/vmalloc.h"Functions | |
| void | vmalloc_init () |
| Initializes the virtual memory allocator. This should be called after frame allocator and paging are initialized. | |
| void * | vmalloc (size_t size) |
Allocates size bytes of virtual memory and returns a pointer to it. The allocation is aligned to VMALLOC_ALIGNMENT. It panics if out of memory. | |
| void | vfree (void *addr) |
Frees the virtual memory allocated at addr. (TODO: stop using bump allocator) | |
Variables | |
| uint8_t * | bump_start |
| The starting address of the bump allocator. | |
| uint8_t * | bump_next |
| The next available address in the bump allocator. | |
| uint8_t * | bump_end |
| The ending address of the bump allocator. (exclusive) | |
| void vfree | ( | void * | addr | ) |
Frees the virtual memory allocated at addr. (TODO: stop using bump allocator)
| void * vmalloc | ( | size_t | size | ) |
Allocates size bytes of virtual memory and returns a pointer to it. The allocation is aligned to VMALLOC_ALIGNMENT. It panics if out of memory.
| void vmalloc_init | ( | void | ) |
Initializes the virtual memory allocator. This should be called after frame allocator and paging are initialized.
| uint8_t* bump_end |
The ending address of the bump allocator. (exclusive)
| uint8_t* bump_next |
The next available address in the bump allocator.
| uint8_t* bump_start |
The starting address of the bump allocator.