Adding RP2350 SDK and target framework (#13988)
[betaflight.git] / lib / main / pico-sdk / rp2_common / pico_malloc / include / pico / malloc.h
blobc498ea064a90f5bc73d205f56bed415f6d28a356
1 /*
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
7 #ifndef _PICO_MALLOC_H
8 #define _PICO_MALLOC_H
10 /** \file malloc.h
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
21 #endif
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
26 #endif
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
31 #endif
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
36 #endif
38 #endif