[U-Boot] [PATCH] malloc_simple: Add simple malloc free function
Chin Liang See
clsee at altera.com
Thu Aug 4 17:09:56 CEST 2016
On Wed, 2016-08-03 at 19:17 -0600, Simon Glass wrote:
> Hi,
>
Hi Simon,
> On 2 August 2016 at 21:24, Chin Liang See <clsee at altera.com> wrote:
> > Enable a simple malloc implementation which will minimize
> > memory usage prior relocation. This is essential as memory
> > available prior location is internal memory and limited in
> > size.
> >
> > This implementation will stored last 2 usage of malloc. When
> > free is invoked and the free address matched, we shall revert
> > to previous value of gd->malloc_ptr that we stored.
>
> I'm really not keen on this patch. Can we not adjust the FAT code to
> avoid repeated malloc()/free()?
>
Sure and let me take a look on enhancing the FAT driver for the
malloc/free aspect.
Thanks
Chin Liang
>
> >
> > Signed-off-by: Chin Liang See <clsee at altera.com>
> > Cc: Marek Vasut <marex at denx.de>
> > Cc: Simon Glass <sjg at chromium.org>
> > Cc: Tom Rini <trini at konsulko.com>
> > Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
> > Cc: Tien Fong Chee <tfchee at altera.com>
> > ---
> > common/dlmalloc.c | 6 ++++--
> > common/malloc_simple.c | 34
> > ++++++++++++++++++++++++++++++++++
> > include/asm-generic/global_data.h | 2 ++
> > include/malloc.h | 3 ++-
> > 4 files changed, 42 insertions(+), 3 deletions(-)
>
> Regards,
> Simon
More information about the U-Boot
mailing list