]> git.sur5r.net Git - u-boot/blobdiff - common/dlmalloc.c
Merge branch 'master' of git://git.denx.de/u-boot-spi
[u-boot] / common / dlmalloc.c
index b395eefbf862cdad5808483750f739edcb8213ed..edaad299bbb552ad8b8710584268e8657f8cd0e7 100644 (file)
@@ -1891,6 +1891,13 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
 
   if ((long)bytes < 0) return NULL;
 
+#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+       if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) {
+               nb = roundup(bytes, alignment);
+               return malloc_simple(nb);
+       }
+#endif
+
   /* If need less alignment than we give anyway, just relay to malloc */
 
   if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes);