Unravel Engine C++ Reference
Loading...
Searching...
No Matches
gfx::eviction::budget_state Struct Reference

#include <eviction.h>

Public Attributes

std::uint64_t hard_limit_bytes = 0
 
std::uint64_t soft_budget_bytes = 0
 
std::uint64_t target_bytes = 0
 
std::uint64_t safety_margin_bytes = 0
 

Detailed Description

Snapshot of the active memory budget the eviction system enforces. The driver (unravel::update_eviction) populates one of these every frame from the backend stats and the user-facing settings; reclaim_for then reads it back via current_budget.

Field semantics, expressed in absolute bytes (no fractions of anything):

  • hard_limit_bytes — never cross this; an allocation projected past it must flush.
  • soft_budget_bytes — begin evicting once usage exceeds this (defines the "begin work" line).
  • target_bytes — evict down to this watermark (hysteresis; should be < soft_budget).
  • safety_margin_bytes — added on top of pending allocations when deciding whether to evict; keeps reclaim_for from edging exactly to the limit.

All-zero state means "no budget reported" — every entry point treats this as "do nothing".

Definition at line 104 of file eviction.h.

Member Data Documentation

◆ hard_limit_bytes

std::uint64_t gfx::eviction::budget_state::hard_limit_bytes = 0

Definition at line 106 of file eviction.h.

◆ safety_margin_bytes

std::uint64_t gfx::eviction::budget_state::safety_margin_bytes = 0

Definition at line 109 of file eviction.h.

◆ soft_budget_bytes

std::uint64_t gfx::eviction::budget_state::soft_budget_bytes = 0

Definition at line 107 of file eviction.h.

◆ target_bytes

std::uint64_t gfx::eviction::budget_state::target_bytes = 0

Definition at line 108 of file eviction.h.


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