mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-10 01:50:25 +01:00
Quick change to previous GC adjustment
This commit is contained in:
parent
08741c919a
commit
228a400752
5 changed files with 23 additions and 14 deletions
|
|
@ -13,12 +13,14 @@ struct ReclaimThresholds {
|
|||
u64 minimum{};
|
||||
u64 expected{};
|
||||
u64 critical{};
|
||||
u64 headroom{};
|
||||
};
|
||||
|
||||
[[nodiscard]] constexpr ReclaimThresholds MakeReclaimThresholds(u64 device_local_memory,
|
||||
u64 target_threshold,
|
||||
u64 default_expected,
|
||||
u64 default_critical) {
|
||||
u64 default_critical,
|
||||
u64 default_headroom) {
|
||||
u64 critical = default_critical;
|
||||
if (device_local_memory != 0) {
|
||||
const u64 budget = (std::min)(device_local_memory, target_threshold);
|
||||
|
|
@ -29,6 +31,7 @@ struct ReclaimThresholds {
|
|||
.minimum = (expected * 3) / 4,
|
||||
.expected = expected,
|
||||
.critical = critical,
|
||||
.headroom = (std::clamp)(device_local_memory / 4, default_headroom, default_headroom * 2),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue