Skip to content

Commit 16ae544

Browse files
Initialize the unaligned memory to avoid complaints about uninitialied.
Location new_alloc in method SimpleMemoryArena::Commit. PiperOrigin-RevId: 426028553 Change-Id: If9d90cb1ab6423df734df217cbf80030528f8ddb
1 parent 840c4d4 commit 16ae544

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎tensorflow/lite/simple_memory_arena.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ TfLiteStatus SimpleMemoryArena::Deallocate(
114114
TfLiteStatus SimpleMemoryArena::Commit(TfLiteContext* context) {
115115
size_t required_size = RequiredBufferSize();
116116
if (required_size > underlying_buffer_size_) {
117-
char* new_alloc = new char[required_size]();
117+
char* new_alloc = new char[required_size];
118118
char* new_underlying_buffer_aligned_ptr = reinterpret_cast<char*>(
119119
AlignTo(arena_alignment_, reinterpret_cast<intptr_t>(new_alloc)));
120120

0 commit comments

Comments
 (0)