File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#include "fastpow.h"
55#include "fastlog.h"
66
7+ #ifdef ARM_CORTEX
78/* The realloc() function changes the size of the memory block pointed to */
89/* by ptr to size bytes. The contents will be unchanged in the range from */
910/* the start of the region up to the minimum of the old and new sizes. If */
@@ -42,6 +43,7 @@ void *pvPortCalloc(size_t nmemb, size_t size){
4243 memset (ptr , 0 , xWantedSize );
4344 return ptr ;
4445}
46+ #endif
4547
4648// todo: see
4749// http://www.hxa.name/articles/content/fast-pow-adjustable_hxa7241_2007.html
Original file line number Diff line number Diff line change @@ -86,12 +86,14 @@ using std::clamp;
8686
8787 float fast_fmodf (float x, float y);
8888
89+ #ifdef ARM_CORTEX
8990#define malloc (x ) pvPortMalloc(x)
9091#define calloc (x, y ) pvPortCalloc(x, y)
9192#define free (x ) vPortFree(x)
9293#define realloc (x, y ) pvPortRealloc(x, y);
9394void * pvPortCalloc (size_t nmemb, size_t size);
9495void * pvPortRealloc (void *pv, size_t xWantedSize);
96+ #endif
9597
9698#ifdef __cplusplus
9799}
You can’t perform that action at this time.
0 commit comments