diff options
author | Matt Brejza <mbrejza@gmail.com> | 2016-07-15 00:13:07 +0100 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-30 21:24:35 +0300 |
commit | afd4909a0f291c83aa8174921f78e1f7dde2919f (patch) | |
tree | 72c2cf7b5de41b43ff68a3bcab9580b2dc426314 | |
parent | 37b143ce9ef761f4f0648bae447617f019fc34e1 (diff) | |
download | micropython-afd4909a0f291c83aa8174921f78e1f7dde2919f.tar.gz micropython-afd4909a0f291c83aa8174921f78e1f7dde2919f.zip |
stmhal: fixing malloc when used with external libraries
-rw-r--r-- | stmhal/mpconfigport.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h index 29e4bd8d87..c2a2cbc1f1 100644 --- a/stmhal/mpconfigport.h +++ b/stmhal/mpconfigport.h @@ -235,9 +235,9 @@ static inline mp_uint_t disable_irq(void) { // 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 gc_alloc -#define free gc_free -#define realloc gc_realloc +#define malloc(n) m_malloc(n) +#define free(p) m_free(p) +#define realloc(p, n) m_realloc(p, n) // see stm32f4XX_hal_conf.h USE_USB_FS & USE_USB_HS // at the moment only USB_FS is supported |