Skip to content

Commit b8bd2a7

Browse files
committed
fix declaration and function name
1 parent 2c7ac77 commit b8bd2a7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

wled00/fcn_declare.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ inline uint8_t hw_random8() { return HW_RND_REGISTER; };
432432
inline uint8_t hw_random8(uint32_t upperlimit) { return (hw_random8() * upperlimit) >> 8; }; // input range 0-255
433433
inline 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)
436436
extern "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
}

wled00/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)