aligned_alloc, parameters order

This commit is contained in:
SG
2024-04-09 17:10:59 +03:00
parent 0d3a717762
commit f1e6de7964
2 changed files with 2 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ char* strdup(const char* s) {
return y;
}
void* aligned_alloc(size_t size, size_t alignment) {
void* aligned_alloc(size_t alignment, size_t size) {
return pvPortAllocAligned(size, alignment);
}

View File

@@ -461,7 +461,7 @@ static bool elf_load_section_data(ELFFile* elf, ELFSection* section, Elf32_Shdr*
return true;
}
section->data = aligned_alloc(section_header->sh_size, section_header->sh_addralign);
section->data = aligned_alloc(section_header->sh_addralign, section_header->sh_size);
section->size = section_header->sh_size;
if(section_header->sh_type == SHT_NOBITS) {