TFLM: Fix hard crash on Arduino.

Long debug log caused the program to crash.

Also this debug log is not much in use anyway.

PiperOrigin-RevId: 338264544
Change-Id: I940208380074e74a40e21cf22960fdc8f1c00c4d
This commit is contained in:
Tiezhen WANG 2020-10-21 08:07:49 -07:00 committed by TensorFlower Gardener
parent d10c8b7495
commit fec830a3c8

View File

@ -621,13 +621,6 @@ MicroAllocator::~MicroAllocator() {}
MicroAllocator* MicroAllocator::Create(uint8_t* tensor_arena, size_t arena_size,
ErrorReporter* error_reporter) {
uint8_t* aligned_arena = AlignPointerUp(tensor_arena, kBufferAlignment);
if (aligned_arena != tensor_arena) {
TF_LITE_REPORT_ERROR(
error_reporter,
"%d bytes lost due to alignment. To avoid this loss, please make sure "
"the tensor_arena is 16 bytes aligned.",
aligned_arena - tensor_arena);
}
size_t aligned_arena_size = tensor_arena + arena_size - aligned_arena;
return Create(SimpleMemoryAllocator::Create(error_reporter, aligned_arena,
aligned_arena_size),