applied platformio structure

This commit is contained in:
2026-03-13 17:03:22 +00:00
parent c5233cf15c
commit db7d90e736
3510 changed files with 691878 additions and 0 deletions

22
lib/tools/operator.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include <memory>
#include <esp_heap_caps.h>
void* operator new(std::size_t count) {
return heap_caps_malloc(count, MALLOC_CAP_SPIRAM);
}
void operator delete(void* ptr) noexcept {
if (ptr) free(ptr);
}
/*
// C++17 only
void* operator new (std::size_t count, std::align_val_t alignment) {
return heap_caps_malloc(count, MALLOC_CAP_SPIRAM);
}
// C++17 only
void operator delete(void* ptr, std::align_val_t alignment) noexcept {
if (ptr) free(ptr);
}
*/