This commit is contained in:
Lander Gallastegi 2025-06-13 23:55:48 +02:00
parent 94f336f6b3
commit 90d8c8db74

View File

@ -225,7 +225,7 @@ struct PageManager::Impl {
PageState& state = cached_pages[page]; PageState& state = cached_pages[page];
// Apply the change to the page state // Apply the change to the page state
const u8 new_count = state.AddDelta<track ? 1 : -1> (); const u8 new_count = state.AddDelta<track ? 1 : -1>();
if (auto new_perms = state.Perm(); new_perms != perms) [[unlikely]] { if (auto new_perms = state.Perm(); new_perms != perms) [[unlikely]] {
// If the protection changed add pending (un)protect action // If the protection changed add pending (un)protect action
@ -293,7 +293,7 @@ struct PageManager::Impl {
// Apply the change to the page state // Apply the change to the page state
const u8 new_count = const u8 new_count =
update ? state.AddDelta<track ? 1 : -1> () : state.AddDelta<0>(); update ? state.AddDelta<track ? 1 : -1>() : state.AddDelta<0>();
if (auto new_perms = state.Perm(); new_perms != perms) [[unlikely]] { if (auto new_perms = state.Perm(); new_perms != perms) [[unlikely]] {
// If the protection changed add pending (un)protect action // If the protection changed add pending (un)protect action