diff options
Diffstat (limited to 'src/common/memory.tpp')
-rw-r--r-- | src/common/memory.tpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/common/memory.tpp b/src/common/memory.tpp deleted file mode 100644 index af833bc..0000000 --- a/src/common/memory.tpp +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include "memory.hpp" - -#include "utils.hpp" - -#include <Arduino.h> -#include <stdlib.h> - -namespace common -{ - -template <typename memType> -memType *malloc_s(unsigned int size) -{ - auto *mem = malloc(size); - - if (mem == nullptr) - { - Serial.println("Error: Memory allocation failed"); - while (true) {} - } - - return static_cast<memType *>(mem); -} - -} // namespace common |