summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/etshal.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-03 00:35:11 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-03 00:35:11 +0300
commit76c81cd5a631f2329a4ec7a5cb53632eae017af4 (patch)
tree5617cb39a61833a06fa06dc7fe1e45063ffd374b /esp8266/etshal.h
parent2123ced3f411fdf506caf1959966b74396e7a38a (diff)
downloadmicropython-76c81cd5a631f2329a4ec7a5cb53632eae017af4.tar.gz
micropython-76c81cd5a631f2329a4ec7a5cb53632eae017af4.zip
esp8266/modesp: Add malloc() and free() functions.
Useful for testing fragmentation issues in OS heap. E.g. freemem() may report large amount, but is it possible to actually allocate block of a given size? Issue malloc() (followed by free()) to find out.
Diffstat (limited to 'esp8266/etshal.h')
-rw-r--r--esp8266/etshal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/esp8266/etshal.h b/esp8266/etshal.h
index d8a57e8c75..0185a9e22c 100644
--- a/esp8266/etshal.h
+++ b/esp8266/etshal.h
@@ -20,4 +20,8 @@ void ets_timer_arm_new(os_timer_t *tim, uint32_t millis, bool repeat, bool is_mi
void ets_timer_setfn(os_timer_t *tim, ETSTimerFunc callback, void *cb_data);
void ets_timer_disarm(os_timer_t *tim);
+// These prototypes are for recent SDKs with "malloc tracking"
+void *pvPortMalloc(unsigned sz, const char *fname, int line);
+void vPortFree(void *p, const char *fname, int line);
+
#endif // _INCLUDED_ETSHAL_H_