|
cbase 1.46.11
C/C++ Static Template
|
Operating System virtual memory wrappers. More...
#include "base/base_types.h"

Go to the source code of this file.
Functions | |
| void * | os_mem_reserve (usize size) |
| Reserves a block of virtual address space. | |
| b32 | os_mem_commit (void *ptr, usize size) |
| Commits physical RAM to a previously reserved address range. | |
| void | os_mem_decommit (void *ptr, usize size) |
| Decommits physical RAM, returning it to the OS while keeping the address space. | |
| void | os_mem_release (void *ptr, usize size) |
| Releases a reserved virtual address range entirely back to the OS. | |
Operating System virtual memory wrappers.
Provides a unified cross-platform API for interacting directly with OS memory pages, without using the C standard library's malloc/free.
This is the lowest layer of the memory subsystem. Higher-level allocators (e.g., the Arena) call these functions internally most application code should not need to call them directly.
This separation allows arenas to reserve gigabytes of address space upfront (cheap), then commit only the pages they actually use (expensive).
Definition in file mem_os.h.