1 /*
2  * Copyright (c) 2024 Silicon Laboratories Inc.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Shim basic sl_* allocation functions to libc malloc, which again
7  * will get redirected to the Zephyr sys_heap.
8  */
9 
10 #include "sl_memory_manager.h"
11 #include <stdlib.h>
12 
sl_malloc(size_t size)13 void *sl_malloc(size_t size)
14 {
15 	return malloc(size);
16 }
17 
sl_free(void * ptr)18 void sl_free(void *ptr)
19 {
20 	free(ptr);
21 }
22 
sl_calloc(size_t item_count,size_t size)23 void *sl_calloc(size_t item_count, size_t size)
24 {
25 	return calloc(item_count, size);
26 }
27 
sl_realloc(void * ptr,size_t size)28 void *sl_realloc(void *ptr, size_t size)
29 {
30 	return realloc(ptr, size);
31 }
32