+// SPDX-License-Identifier: LGPL-2.1-or-later
/*
- * Copyright (C) 2019-2020 Paul Cercueil <paul@crapouillou.net>
- *
- * 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 <paul@crapouillou.net>
*/
-#include "config.h"
+#include "lightrec-config.h"
#include "lightrec-private.h"
#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];
{
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;
{
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;
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)