remove runtime memory callback use for leanpsk

This commit is contained in:
toddouska 2012-11-30 15:41:01 -08:00
parent c50f73b4cb
commit f23013b8a7
2 changed files with 13 additions and 2 deletions

View File

@ -99,6 +99,15 @@
#define USE_WINDOWS_API
#endif
#ifdef CYASSL_LEANPSK
#include <stdlib.h>
#define XMALLOC(s, h, type) malloc((s))
#define XFREE(p, h, type) free((p))
#define XREALLOC(p, n, h, t) realloc((p), (n))
#endif
#ifdef FREERTOS
#define NO_WRITEV
#define NO_SHA512
@ -413,7 +422,8 @@
#endif /* MICRIUM */
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC)
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
!defined(CYASSL_LEANPSK)
#define USE_CYASSL_MEMORY
#endif

View File

@ -151,7 +151,8 @@ enum {
extern void *XREALLOC(void *p, size_t n, void* heap, int type);
extern void XFREE(void *p, void* heap, int type);
#elif !defined(MICRIUM_MALLOC) && !defined(EBSNET) \
&& !defined(CYASSL_SAFERTOS) && !defined(FREESCALE_MQX)
&& !defined(CYASSL_SAFERTOS) && !defined(FREESCALE_MQX) \
&& !defined(CYASSL_LEANPSK)
/* default C runtime, can install different routines at runtime */
#include <cyassl/ctaocrypt/memory.h>
#define XMALLOC(s, h, t) ((void)h, (void)t, CyaSSL_Malloc((s)))