From 39464406548bcc8a5c18dee4be1036b3b7ea2259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Fri, 18 Oct 2024 08:51:04 +0900 Subject: [PATCH] fix: use vector over array to reduce executable size by 1MiB --- src/jobs.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jobs.hpp b/src/jobs.hpp index 8ec92bd..99cd04f 100644 --- a/src/jobs.hpp +++ b/src/jobs.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -79,7 +80,7 @@ class KggTask { } size_t offset{0}; - thread_local std::array temp_buffer{}; + thread_local std::vector temp_buffer(1024 * 1024, 0); auto buf_signed = std::span(reinterpret_cast(temp_buffer.data()), temp_buffer.size()); auto buf_unsigned = std::span(temp_buffer);