Module rkos::mm [] [src]

Memory management.

In general, all memory is directly mapped physical-to-virtual with no protection. All of physical memory is part of a memory pool managed with TLSF. Thread stacks are the only true users of virtual memory, mapped into the top of virtual memory. From (top of memory) - (thread stack size) to (top of physical memory) is unmapped virtual memory.

The advantage of this approach is that allocation of both physical and virtual memory need not be tracked. Only physical memory allocation is tracked, and virtual memory allocation is implicit according to the active thread.

Modules

phys
virt

Virtual memory management.

Structs

PhysPtr

Functions

disable_vm

Disable virtual memory.

enable_vm

Enable virtual memory.

memcmp
memcpy

Copy n bytes from src to dest. Must not overlap.

memmove

Copy n bytes from dest to src; buffers may overlap.

memset

Set the n bytes at s to the value of c, truncated to a byte.