fix coredump

This commit is contained in:
Thomas Kunze
2019-07-15 21:32:00 +02:00
parent 24834d0f51
commit c5bf61a44f
2 changed files with 8 additions and 5 deletions

View File

@@ -31,9 +31,10 @@ void Platform::freeMemory(uint8_t* ptr)
Platform::Platform()
{
// allocate memory to have a memory reference, substract a bit
_memoryReference = (uint8_t*)malloc(1) - 1024;
// allocate memory to have a memory reference, substract a bit
_memoryReference = (uint8_t*)malloc(1);
free(_memoryReference);
print("MemRef: ");
_memoryReference -= 1024;
print("MemRef: ");
println((long unsigned int)_memoryReference, HEX);
}