Make GC V3 EXP boost config-driven

This commit is contained in:
2026-05-24 01:19:02 -04:00
parent f8ebc67c90
commit 0b3464b4fc
3 changed files with 451 additions and 451 deletions
+8 -8
View File
@@ -3738,10 +3738,10 @@ static asio::awaitable<void> dispatch_gc_v3_exp_patch(shared_ptr<Client> c) {
} }
uint32_t base_exp = uint32_t base_exp =
(static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset])) << 24) | static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset])) |
(static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset + 1])) << 16) | (static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset + 1])) << 8) |
(static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset + 2])) << 8) | (static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset + 2])) << 16) |
static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset + 3])); (static_cast<uint32_t>(static_cast<uint8_t>(fn->code[offset + 3])) << 24);
uint64_t scaled_exp = static_cast<uint64_t>(base_exp) * uint64_t scaled_exp = static_cast<uint64_t>(base_exp) *
static_cast<uint64_t>(server_state->gc_v3_exp_multiplier); static_cast<uint64_t>(server_state->gc_v3_exp_multiplier);
@@ -3749,10 +3749,10 @@ static asio::awaitable<void> dispatch_gc_v3_exp_patch(shared_ptr<Client> c) {
scaled_exp = 0xFFFFFFFFULL; scaled_exp = 0xFFFFFFFFULL;
} }
fn->code[offset] = static_cast<char>((scaled_exp >> 24) & 0xFF); fn->code[offset] = static_cast<char>(scaled_exp & 0xFF);
fn->code[offset + 1] = static_cast<char>((scaled_exp >> 16) & 0xFF); fn->code[offset + 1] = static_cast<char>((scaled_exp >> 8) & 0xFF);
fn->code[offset + 2] = static_cast<char>((scaled_exp >> 8) & 0xFF); fn->code[offset + 2] = static_cast<char>((scaled_exp >> 16) & 0xFF);
fn->code[offset + 3] = static_cast<char>(scaled_exp & 0xFF); fn->code[offset + 3] = static_cast<char>((scaled_exp >> 24) & 0xFF);
} }
co_await send_function_call(c, fn); co_await send_function_call(c, fn);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff