aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/dlmalloc.c3
-rw-r--r--include/malloc.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index edaad29..6f12a18 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1893,8 +1893,7 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) {
- nb = roundup(bytes, alignment);
- return malloc_simple(nb);
+ return memalign_simple(alignment, bytes);
}
#endif
diff --git a/include/malloc.h b/include/malloc.h
index b714fed..5efa692 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -878,7 +878,6 @@ extern Void_t* sbrk();
#define memalign memalign_simple
static inline void free(void *ptr) {}
void *calloc(size_t nmemb, size_t size);
-void *memalign_simple(size_t alignment, size_t bytes);
void *realloc_simple(void *ptr, size_t size);
void malloc_simple_info(void);
#else
@@ -914,6 +913,7 @@ int initf_malloc(void);
/* Simple versions which can be used when space is tight */
void *malloc_simple(size_t size);
+void *memalign_simple(size_t alignment, size_t bytes);
#pragma GCC visibility push(hidden)
# if __STD_C