1 #ifndef VIRTMEM_UTILS_H
2 #define VIRTMEM_UTILS_H
12 inline void freeRam(
const char *msg)
18 stacktop = (uint32_t)&stacktop;
21 void *top = malloc(1);
22 heaptop = (uint32_t)top;
26 Serial.print(msg); Serial.println(stacktop - heaptop);
38 Serial.print("Assertion failed!: "); Serial.print(#x); Serial.print(" @ "); Serial.print(__FILE__); Serial.print(":"); Serial.println(__LINE__); \
52 namespace private_utils {
54 template <
typename T> T minimal(
const T &v1,
const T &v2) {
return (v1 < v2) ? v1 : v2; }
55 template <
typename T> T maximal(
const T &v1,
const T &v2) {
return (v1 > v2) ? v1 : v2; }
57 template <
typename T>
struct AntiConst {
typedef T type; };
58 template <
typename T>
struct AntiConst<const T> {
typedef T type; };
64 #endif // VIRTMEM_UTILS_H
contains all code from virtmem
Definition: base_alloc.cpp:22