2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
4 * SPDX-License-Identifier: BSD-3-Clause
11 * \defgroup pico_malloc pico_malloc
13 * \brief Multi-core safety for malloc, calloc and free
15 * This library does not provide any additional functions
18 // PICO_CONFIG: PICO_USE_MALLOC_MUTEX, Whether to protect malloc etc with a mutex, type=bool, default=1 with pico_multicore, 0 otherwise, group=pico_malloc
19 #if LIB_PICO_MULTICORE && !defined(PICO_USE_MALLOC_MUTEX)
20 #define PICO_USE_MALLOC_MUTEX 1
23 // PICO_CONFIG: PICO_MALLOC_PANIC, Enable/disable panic when an allocation failure occurs, type=bool, default=1, group=pico_malloc
24 #ifndef PICO_MALLOC_PANIC
25 #define PICO_MALLOC_PANIC 1
28 // PICO_CONFIG: PICO_DEBUG_MALLOC, Enable/disable debug printf from malloc, type=bool, default=0, group=pico_malloc
29 #ifndef PICO_DEBUG_MALLOC
30 #define PICO_DEBUG_MALLOC 0
33 // PICO_CONFIG: PICO_DEBUG_MALLOC_LOW_WATER, Define the lower bound for allocation addresses to be printed by PICO_DEBUG_MALLOC, min=0, default=0, group=pico_malloc
34 #ifndef PICO_DEBUG_MALLOC_LOW_WATER
35 #define PICO_DEBUG_MALLOC_LOW_WATER 0