File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ inline uint8_t hw_random8() { return HW_RND_REGISTER; };
432432inline uint8_t hw_random8 (uint32_t upperlimit) { return (hw_random8 () * upperlimit) >> 8 ; }; // input range 0-255
433433inline uint8_t hw_random8 (uint32_t lowerlimit, uint32_t upperlimit) { uint32_t range = upperlimit - lowerlimit; return lowerlimit + hw_random8 (range); }; // input range 0-255
434434
435- // memory allocation wrappers
435+ // memory allocation wrappers (util.cpp)
436436extern " C" {
437437 // prefer DRAM in d_xalloc functions, PSRAM as fallback
438438 void *d_malloc (size_t );
@@ -452,6 +452,7 @@ extern "C" {
452452 #else
453453 #define p_malloc d_malloc
454454 #define p_calloc d_calloc
455+ #define p_realloc_malloc d_realloc_malloc
455456 #define p_free d_free
456457 #endif
457458}
Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ void *d_calloc(size_t count, size_t size) {
667667}
668668
669669// realloc with malloc fallback, note: on ESPS8266 there is no safe way to ensure MIN_HEAP_SIZE during realloc()s, free buffer and allocate new one
670- void *realloc_malloc (void *ptr, size_t size) {
670+ void *d_realloc_malloc (void *ptr, size_t size) {
671671 free (ptr);
672672 return d_malloc (size);
673673}
You can’t perform that action at this time.
0 commit comments