File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/AudioTools/CoreAudio/AudioBasic/Collections Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -106,15 +106,19 @@ class AllocatorExt : public Allocator {
106106 }
107107};
108108
109+
110+ #if (defined(ESP32)) && defined(ARDUINO)
111+
109112/* *
110- * @brief Memory allocateator which forces the allocation in RAM.
113+ * @brief ESP32 Memory allocateator which forces the allocation with the defined
114+ * attirbutes
111115 * @ingroup memorymgmt
112116 * @author Phil Schatzmann
113117 * @copyright GPLv3
114118 */
115119
116- class AllocatorESP32 : public Allocator {
117- AllocatorESP32 (int scap = MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL) {
120+ class AllocatorESP32 : public Allocator {
121+ AllocatorESP32 (int caps = MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL) {
118122 this ->caps = caps;
119123 }
120124 void * do_allocate (size_t size) {
@@ -125,15 +129,15 @@ class AllocatorESP32 : public Allocator {
125129 LOGE (" alloc failed for %zu bytes" , size);
126130 stop ();
127131 }
128- // initialize object
129- memset (result, 0 , size);
130132 return result;
131133 }
132134
133135 protected:
134136 int caps = 0 ;
135137};
136138
139+ #endif
140+
137141#if (defined(RP2040) || defined(ESP32)) && defined(ARDUINO)
138142
139143/* *
You can’t perform that action at this time.
0 commit comments