Skip to content

Commit

Permalink
Fix ESP-IDF platform mmap data size error (#3288)
Browse files Browse the repository at this point in the history
  • Loading branch information
donghengqaz authored Apr 7, 2024
1 parent 4109fce commit e885a07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/shared/platform/esp-idf/espidf_memmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
#else
uint32_t mem_caps = MALLOC_CAP_8BIT;
#endif
void *buf_origin = heap_caps_malloc(size, mem_caps);
void *buf_origin =
heap_caps_malloc(size + 4 + sizeof(uintptr_t), mem_caps);
if (!buf_origin) {
return NULL;
}
Expand Down

0 comments on commit e885a07

Please sign in to comment.