Fix Free/SafeRTOS with XMALLOC_USER

This commit is contained in:
Eric Blankenhorn
2021-01-25 09:10:15 -06:00
parent 4b47bf7b4e
commit f7408560c6

View File

@@ -721,10 +721,10 @@ extern void uITRON4_free(void *p) ;
!defined(WOLFSSL_STATIC_MEMORY)
#define XMALLOC(s, h, type) pvPortMalloc((s))
#define XFREE(p, h, type) vPortFree((p))
#endif
/* FreeRTOS pvPortRealloc() implementation can be found here:
https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */
#if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || defined(HAVE_ED448)
#if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || \
defined(HAVE_ED448)
#if defined(WOLFSSL_ESPIDF)
/*In IDF, realloc(p, n) is equivalent to
heap_caps_realloc(p, s, MALLOC_CAP_8BIT) */
@@ -733,6 +733,8 @@ extern void uITRON4_free(void *p) ;
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
#endif
#endif
#endif
#ifndef NO_WRITEV
#define NO_WRITEV
#endif
@@ -910,13 +912,15 @@ extern void uITRON4_free(void *p) ;
!defined(WOLFSSL_STATIC_MEMORY)
#define XMALLOC(s, h, type) pvPortMalloc((s))
#define XFREE(p, h, type) vPortFree((p))
#endif
/* FreeRTOS pvPortRealloc() implementation can be found here:
https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */
#if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || defined(HAVE_ED448)
#if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || \
defined(HAVE_ED448)
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
#endif
#endif
#endif
#ifdef WOLFSSL_LOW_MEMORY
#undef RSA_LOW_MEM