Skip to content

Commit

Permalink
Merge pull request #7 from rickgaiser/ee-v4.3.0
Browse files Browse the repository at this point in the history
Fix nano malloc 16byte alignment
  • Loading branch information
fjtrujy authored Jul 13, 2023
2 parents 030d577 + 2a885b6 commit 3193c85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions newlib/libc/stdlib/nano-mallocr.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@
(((size) + (align) - (size_t)1) & ~((align) - (size_t)1))

/* Alignment of allocated block */
#ifndef MALLOC_ALIGNMENT
#define MALLOC_ALIGN (8U)
#else
#define MALLOC_ALIGN MALLOC_ALIGNMENT
#endif
#define CHUNK_ALIGN (sizeof(void*))
#define MALLOC_PADDING ((MAX(MALLOC_ALIGN, CHUNK_ALIGN)) - CHUNK_ALIGN)

Expand Down

0 comments on commit 3193c85

Please sign in to comment.