X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flightrec%2Fmemmanager.c;h=2934d4c78f551402a646da58b02b6321639aa403;hb=e2fb1389dc12376acb84e4993ed3b08760257252;hp=2e6b99bf8c55d1b985849175cd1cb66564c605fa;hpb=d16005f843cd28ae90f091bd4e39a90b355e1d45;p=pcsx_rearmed.git diff --git a/deps/lightrec/memmanager.c b/deps/lightrec/memmanager.c index 2e6b99bf..2934d4c7 100644 --- a/deps/lightrec/memmanager.c +++ b/deps/lightrec/memmanager.c @@ -1,27 +1,15 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later /* - * Copyright (C) 2019-2020 Paul Cercueil - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Copyright (C) 2019-2021 Paul Cercueil */ -#include "config.h" +#include "lightrec-config.h" #include "lightrec-private.h" #include "memmanager.h" #include -#if ENABLE_TINYMM -#include -#endif -#ifdef ENABLE_THREADED_COMPILER +#if ENABLE_THREADED_COMPILER #include static atomic_uint lightrec_bytes[MEM_TYPE_END]; @@ -76,12 +64,7 @@ void * lightrec_malloc(struct lightrec_state *state, { void *ptr; -#if ENABLE_TINYMM - if (type == MEM_FOR_IR) - ptr = tinymm_malloc(state->tinymm, len); - else -#endif - ptr = malloc(len); + ptr = malloc(len); if (!ptr) return NULL; @@ -95,12 +78,7 @@ void * lightrec_calloc(struct lightrec_state *state, { void *ptr; -#if ENABLE_TINYMM - if (type == MEM_FOR_IR) - ptr = tinymm_zalloc(state->tinymm, len); - else -#endif - ptr = calloc(1, len); + ptr = calloc(1, len); if (!ptr) return NULL; @@ -113,12 +91,7 @@ void lightrec_free(struct lightrec_state *state, enum mem_type type, unsigned int len, void *ptr) { lightrec_unregister(type, len); -#if ENABLE_TINYMM - if (type == MEM_FOR_IR) - tinymm_free(state->tinymm, ptr); - else -#endif - free(ptr); + free(ptr); } float lightrec_get_average_ipi(void)