8 #include "RtosHeap.hpp"
13 extern unsigned long _heap;
14 extern unsigned long _eheap;
16 bool RtosHeap::sIsInitialized =
false;
19 uint8_t RtosHeap::sMemLocation[
sizeof(LibDmem)];
20 LibDmem* RtosHeap::sMem;
27 if (!sIsInitialized) {
28 RtosHeap::sSemaphore =
new (sSemaphoreLocation)
RtosSemaphore(1, 1);
29 RtosHeap::sMem =
new (sMemLocation) LibDmem(&_heap, (uint32_t) &_eheap - (uint32_t) &_heap);
30 sIsInitialized =
true;
33 void* result = sMem->alloc(size);
55 void* result = sMem->resize(p, size);
67 void* result = sMem->resizeLeft(p, left);
77 return sMem->getTotalMemory();
85 return sMem->getFreeMemory();
93 return sMem->getBlockCount();