Skip to content

Commit

Permalink
Fix memset of memory pool in PageMemoryManagerCreate (apache#12437)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugy718 authored Aug 18, 2022
1 parent 250b68e commit da7675c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/crt/memory/page_allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ tvm_crt_error_t PageMemoryManager_Free(MemoryManagerInterface* interface, void*
tvm_crt_error_t PageMemoryManagerCreate(MemoryManagerInterface** interface, uint8_t* memory_pool,
size_t memory_pool_size_bytes,
size_t page_size_bytes_log2) {
memset(memory_pool, 0, sizeof(memory_pool_size_bytes));
memset(memory_pool, 0, memory_pool_size_bytes);

// Allocate enough space for MAX_PAGES.
size_t page_size_bytes = 1 << page_size_bytes_log2;
Expand Down

0 comments on commit da7675c

Please sign in to comment.