cbase 1.46.11
C/C++ Static Template
Loading...
Searching...
No Matches
Arena Struct Reference

Represents a linear memory arena backed by OS virtual memory. More...

#include <mem_arena.h>

Public Attributes

u8base
usize cap
usize pos
usize cmt

Detailed Description

Represents a linear memory arena backed by OS virtual memory.

Note
Treat this as an opaque value. Modify fields only through the arena_* API to keep the reserve/commit invariants intact.

Definition at line 83 of file mem_arena.h.

Member Data Documentation

◆ base

u8* Arena::base

Pointer to the start of the reserved virtual address range.

Definition at line 84 of file mem_arena.h.

◆ cap

usize Arena::cap

Total size of the reserved virtual address range in bytes.

Definition at line 85 of file mem_arena.h.

◆ cmt

usize Arena::cmt

Number of bytes currently backed by physical RAM (committed).

Definition at line 87 of file mem_arena.h.

◆ pos

usize Arena::pos

Current bump offset. Next allocation starts at base[ALIGN(pos)].

Definition at line 86 of file mem_arena.h.


The documentation for this struct was generated from the following file: