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.
This commit is contained in:
Paul Sokolovsky
2016-05-03 00:35:11 +03:00
parent 2123ced3f4
commit 76c81cd5a6
2 changed files with 18 additions and 0 deletions

View File

@@ -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_