Skip to content

Commit

Permalink
aligned_malloc -> aligned_alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
DrZlo13 committed Apr 9, 2024
1 parent 5bca6d2 commit 0d3a717
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion furi/core/memmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ char* strdup(const char* s) {
return y;
}

void* aligned_malloc(size_t size, size_t alignment) {
void* aligned_alloc(size_t size, size_t alignment) {
return pvPortAllocAligned(size, alignment);
}

Expand Down
8 changes: 0 additions & 8 deletions furi/core/memmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ size_t memmgr_get_total_heap(void);
*/
size_t memmgr_get_minimum_free_heap(void);

/**
* An aligned version of malloc, used when you need to get the aligned space on the heap.
* @param size
* @param alignment
* @return void*
*/
void* aligned_malloc(size_t size, size_t alignment);

/**
* @brief Allocate memory from the auxiliary memory pool. That memory can't be freed.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/flipper_application/elf/elf_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static bool elf_load_section_data(ELFFile* elf, ELFSection* section, Elf32_Shdr*
return true;
}

section->data = aligned_malloc(section_header->sh_size, section_header->sh_addralign);
section->data = aligned_alloc(section_header->sh_size, section_header->sh_addralign);
section->size = section_header->sh_size;

if(section_header->sh_type == SHT_NOBITS) {
Expand Down
3 changes: 1 addition & 2 deletions targets/f18/api_symbols.csv
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,7 @@ Function,-,acosh,double,double
Function,-,acoshf,float,float
Function,-,acoshl,long double,long double
Function,-,acosl,long double,long double
Function,-,aligned_alloc,void*,"size_t, size_t"
Function,+,aligned_malloc,void*,"size_t, size_t"
Function,+,aligned_alloc,void*,"size_t, size_t"
Function,-,arc4random,__uint32_t,
Function,-,arc4random_buf,void,"void*, size_t"
Function,-,arc4random_uniform,__uint32_t,__uint32_t
Expand Down
3 changes: 1 addition & 2 deletions targets/f7/api_symbols.csv
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,7 @@ Function,-,acosh,double,double
Function,-,acoshf,float,float
Function,-,acoshl,long double,long double
Function,-,acosl,long double,long double
Function,-,aligned_alloc,void*,"size_t, size_t"
Function,+,aligned_malloc,void*,"size_t, size_t"
Function,+,aligned_alloc,void*,"size_t, size_t"
Function,-,arc4random,__uint32_t,
Function,-,arc4random_buf,void,"void*, size_t"
Function,-,arc4random_uniform,__uint32_t,__uint32_t
Expand Down

0 comments on commit 0d3a717

Please sign in to comment.