spu: don't leave garbage in capture buffers
[pcsx_rearmed.git] / deps / lightrec / memmanager.c
index d39b669..2934d4c 100644 (file)
@@ -8,11 +8,8 @@
 #include "memmanager.h"
 
 #include <stdlib.h>
-#if ENABLE_TINYMM
-#include <tinymm.h>
-#endif
 
-#ifdef ENABLE_THREADED_COMPILER
+#if ENABLE_THREADED_COMPILER
 #include <stdatomic.h>
 
 static atomic_uint lightrec_bytes[MEM_TYPE_END];
@@ -67,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;
 
@@ -86,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;
 
@@ -104,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)