[U-Boot] [PATCH v2 1/2] malloc_simple: Add Kconfig option for using only malloc_simple in the SPL

Simon Glass sjg at chromium.org
Sat Oct 3 16:28:37 CEST 2015


On 22 September 2015 at 11:25, Hans de Goede <hdegoede at redhat.com> wrote:
> common/dlmalloc.c is quite big, both in .text and .data usage, therefor
> on some boards the SPL is build to use only malloc_simple.c and not the
> dlmalloc.c code. This is done in various include/configs/foo.h with the
> following construct:
>
>  #ifdef CONFIG_SPL_BUILD
>  #define CONFIG_SYS_MALLOC_SIMPLE
>  #endif
>
> This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows
> selecting this functionality through Kconfig instead.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> Changes in v2:
> -Fix commit message wrt quoting lines starting with a #
> -Rename Kconfig option from SPL_MALLOC_SIMPLE to SPL_SYS_MALLOC_SIMPLE
> -Simplify the ifdef checks to #if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE)
> ---
>  Kconfig                | 10 ++++++++++
>  common/malloc_simple.c |  2 +-
>  include/_exports.h     |  2 +-
>  include/exports.h      |  2 +-
>  include/malloc.h       |  2 +-
>  5 files changed, 14 insertions(+), 4 deletions(-)

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list