diff options
author | Damien George <damien.p.george@gmail.com> | 2019-03-26 18:40:05 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-03-26 18:42:19 +1100 |
commit | 781947afdc11887f30957dccc37593caff97b79f (patch) | |
tree | 6164f16289e83756a32bc661a6745b38bea9533d | |
parent | 1556af19bfde9e8f14c84e2bc6a2c3a087e18325 (diff) |
stm32/mpconfigport.h: Remove malloc/free/realloc helper macros.
These macros are unused, and they can conflict with other entities by the
same name. If needed they can be provided as static inline functions, or
just functions.
Fixes issue #4559.
-rw-r--r-- | ports/stm32/mpconfigport.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index bdceb8c53..86f65fda2 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -365,13 +365,5 @@ static inline mp_uint_t disable_irq(void) { // We need an implementation of the log2 function which is not a macro #define MP_NEED_LOG2 (1) -// There is no classical C heap in bare-metal ports, only Python -// garbage-collected heap. For completeness, emulate C heap via -// GC heap. Note that MicroPython core never uses malloc() and friends, -// so these defines are mostly to help extension module writers. -#define malloc(n) m_malloc(n) -#define free(p) m_free(p) -#define realloc(p, n) m_realloc(p, n) - // We need to provide a declaration/definition of alloca() #include <alloca.h> |