Skip to content

Commit e948329

Browse files
committed
remove static_assert checks on alignment
Cleanup '//D' comments Improvements to new/delete debug logging
1 parent 54b034b commit e948329

File tree

3 files changed

+159
-152
lines changed

3 files changed

+159
-152
lines changed

cores/esp8266/abi.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
3636

3737

3838
#if DEV_DEBUG_ABI_CPP
39-
extern "C" void _dbg_abi_print_pstr(const char* op, const char *function_name, const void* caller);
40-
#define DEBUG_NEW_OP_PRINTF() _dbg_abi_print_pstr("new_op", __PRETTY_FUNCTION__, NULL)
39+
extern "C" void _dbg_abi_print_pstr(const char* op, const char *function_name);
40+
#define DEBUG_NEW_OP_PRINTF() _dbg_abi_print_pstr("new_op", __PRETTY_FUNCTION__)
4141
#else
4242
#define DEBUG_NEW_OP_PRINTF() do { } while (false)
4343
#endif
@@ -351,9 +351,10 @@ void* operator new[] (size_t size, const std::nothrow_t&)
351351
#endif // #elif !defined(__cpp_exceptions) #if defined(UMM_ENABLE_MEMALIGN)
352352
#else
353353
/*
354-
Using weaklink C++ Exception handlers in libstdc. The "new" operators that
355-
express alignment should work through libstdc via memalign() in the umm_malloc
356-
library.
354+
The C++ Exception handlers in libstdc are using weaklinks. The "new" operators
355+
that express alignment should work through libstdc via memalign() in the
356+
umm_malloc library. While not likely to ever be needed, the Sketch can replace
357+
the C++ "Replaceable allocation functions."
357358
358359
Note that libstdc will fail errors in alignment value early. Thus, the
359360
UMM_STATS_FULL alignment error count will be zero.
@@ -367,8 +368,8 @@ void* operator new[] (size_t size, const std::nothrow_t&)
367368
#pragma message("Using weaklink C++ Exception handlers in libstdc")
368369
#if UMM_ENABLE_MEMALIGN
369370
#pragma message("The \"new\" operators that express alignment should work through libstdc via memalign() in the umm_malloc library.")
370-
//D >>
371371
#endif
372+
//D >>
372373

373374
#endif // #if defined(__cpp_exceptions)
374375

0 commit comments

Comments
 (0)