BT sleep leak now down to about 200 bytes

This commit is contained in:
geeksville
2020-02-23 18:09:40 -08:00
parent 621beadb5c
commit 419dd44ff6
6 changed files with 41 additions and 11 deletions

View File

@@ -1,7 +1,6 @@
#include "SimpleAllocator.h"
#include "assert.h"
SimpleAllocator *activeAllocator;
SimpleAllocator::SimpleAllocator() { reset(); }
@@ -22,6 +21,11 @@ void *operator new(size_t size, SimpleAllocator &p)
return p.alloc(size);
}
#if 0
// This was a dumb idea, turn off for now
SimpleAllocator *activeAllocator;
AllocatorScope::AllocatorScope(SimpleAllocator &a)
{
assert(!activeAllocator);
@@ -51,4 +55,6 @@ void operator delete(void *ptr) throw()
Serial.println("Warning: leaking an active allocator object"); // We don't properly handle this yet
else
free(ptr);
}
}
#endif