initial test app that shows potential memory usage by mbed-rtos
Dependencies: mbed-rtosMemoryTest mbed
heapsize.hpp
- Committer:
- dmatsumoto
- Date:
- 2014-12-09
- Revision:
- 0:9a0840718117
File content as of revision 0:9a0840718117:
#ifndef __HEAPSIZE_HPP__
#define __HEAPSIZE_HPP__
unsigned long heapSize()
{
char stackVariable;
void *heap;
unsigned long result;
heap = malloc(4);
result = (uint8_t*)&stackVariable - (uint8_t*)heap;
free(heap);
return result;
}
#endif