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 {
106
106
}
107
107
};
108
108
109
+
110
+ #if (defined(ESP32)) && defined(ARDUINO)
111
+
109
112
/* *
110
- * @brief Memory allocateator which forces the allocation in RAM.
113
+ * @brief ESP32 Memory allocateator which forces the allocation with the defined
114
+ * attirbutes
111
115
* @ingroup memorymgmt
112
116
* @author Phil Schatzmann
113
117
* @copyright GPLv3
114
118
*/
115
119
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) {
118
122
this ->caps = caps;
119
123
}
120
124
void * do_allocate (size_t size) {
@@ -125,15 +129,15 @@ class AllocatorESP32 : public Allocator {
125
129
LOGE (" alloc failed for %zu bytes" , size);
126
130
stop ();
127
131
}
128
- // initialize object
129
- memset (result, 0 , size);
130
132
return result;
131
133
}
132
134
133
135
protected:
134
136
int caps = 0 ;
135
137
};
136
138
139
+ #endif
140
+
137
141
#if (defined(RP2040) || defined(ESP32)) && defined(ARDUINO)
138
142
139
143
/* *
You can’t perform that action at this time.
0 commit comments