From 5ff44ebcf5598901b680edd8845ac7ea47cb3436 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 29 Nov 2023 01:55:54 +1000 Subject: [PATCH] CPU: Panic process on memory alloc fail --- src/core/pgxp.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/pgxp.cpp b/src/core/pgxp.cpp index 636fc04dd..809173d05 100644 --- a/src/core/pgxp.cpp +++ b/src/core/pgxp.cpp @@ -6,6 +6,7 @@ #include "cpu_core.h" #include "settings.h" +#include "common/assert.h" #include "common/log.h" #include @@ -276,10 +277,7 @@ void PGXP::Initialize() { Mem = static_cast(std::calloc(PGXP_MEM_SIZE, sizeof(PGXP_value))); if (!Mem) - { - std::fprintf(stderr, "Failed to allocate PGXP memory\n"); - std::abort(); - } + Panic("Failed to allocate PGXP memory"); } if (g_settings.gpu_pgxp_vertex_cache && !vertexCache)