#pragma once #include "memory.hpp" #include "utils.hpp" #include #include namespace common { template memType *malloc_s(unsigned int size) { auto *mem = malloc(size); if (mem == nullptr) { Serial.println("Error: Memory allocation failed"); while (true) {} } return static_cast(mem); } } // namespace common