summaryrefslogtreecommitdiff
path: root/sys/vm/vm_physmem.c
AgeCommit message (Collapse)Author
5 dayskernel: Prevent physmem clobbers + zero memoryIan Moffett
To prevent a situation where there is a data race between one thread freeing physical memory and one allocating physical memory. Do not immediately reuse freed physical memory. Instead, keep allocating upwards and once there is no more room, wrap the last_idx back to the bitmap free index. We now also zero allocated physical memory for security reasons. Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: physmem: Make globals staticIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: physmem: Only set bits if memory is foundIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: physmem: Allocate unfragmented phys memoryIan Moffett
- Ensure a contiguous region of physical memory is allocated in vm_alloc_frame() - Fix issues with physical memory being clobbered with excessive allocations - Clean up frame walk loop Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: physmem: Ensure base is page alignedIan Moffett
- Use ALIGN_UP() on base address in vm_free_frame() Signed-off-by: Ian Moffett <ian@osmora.org>
2025-02-16project: Update copyright date to 2025Ian Moffett
Was supposed to happen on Jan 1, sorry! Happy late new year! Signed-off-by: Ian Moffett <ian@osmora.org>
2024-06-04kernel: vm: Add physical memory allocatorIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>