diff --git a/src/rp2_common/pico_standard_link/new_delete.cpp b/src/rp2_common/pico_standard_link/new_delete.cpp index c122dc0..6d632e2 100644 --- a/src/rp2_common/pico_standard_link/new_delete.cpp +++ b/src/rp2_common/pico_standard_link/new_delete.cpp @@ -4,9 +4,10 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#if !PICO_CXX_ENABLE_EXCEPTIONS +#if !PICO_CXX_ENABLE_EXCEPTIONS // Override the standard allocators to use regular malloc/free +#if !PICO_CXX_DISABLE_ALLOCATION_OVERRIDES // Let user override #include void *operator new(std::size_t n) { @@ -30,3 +31,5 @@ void operator delete[](void *p, __unused std::size_t n) noexcept { std::free(p); #endif #endif + +#endif