|
cbase 1.50.0
C/C++ Static Template
|
Cross-platform wrappers for OS-level virtual memory management. More...


Go to the source code of this file.
Functions | |
| usize | mem_os_page_size (void) |
| Retrieves the operating system's virtual memory page size. | |
| void * | mem_os_reserve (usize size) |
| Reserves a contiguous block of virtual address space. | |
| b32 | mem_os_commit (void *ptr, usize size) |
| Commits physical RAM to a previously reserved virtual address block. | |
| void | mem_os_decommit (void *ptr, usize size) |
| Decommits physical RAM, returning it to the OS. | |
| void | mem_os_release (void *ptr, usize size) |
| Releases a reserved virtual address block entirely back to the OS. | |
Cross-platform wrappers for OS-level virtual memory management.
Provides a unified API over Windows VirtualAlloc and POSIX mmap. Separates the concepts of reserving virtual address space from committing physical RAM pages. This is the lowest layer of the memory subsystem — most application code should use MemArena rather than calling these directly.
Definition in file mem_os.h.