1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 * Copyright (C) 2019-2021 Paul Cercueil <paul@crapouillou.net>
6 #ifndef __MEMMANAGER_H__
7 #define __MEMMANAGER_H__
19 void * lightrec_malloc(struct lightrec_state *state,
20 enum mem_type type, unsigned int len);
21 void * lightrec_calloc(struct lightrec_state *state,
22 enum mem_type type, unsigned int len);
23 void lightrec_free(struct lightrec_state *state,
24 enum mem_type type, unsigned int len, void *ptr);
26 void lightrec_register(enum mem_type type, unsigned int len);
27 void lightrec_unregister(enum mem_type type, unsigned int len);
29 unsigned int lightrec_get_mem_usage(enum mem_type type);
30 unsigned int lightrec_get_total_mem_usage(void);
31 float lightrec_get_average_ipi(void);
33 #endif /* __MEMMANAGER_H__ */