public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] malloc_simple: Add simple malloc free function
Date: Thu, 4 Aug 2016 23:09:56 +0800	[thread overview]
Message-ID: <1470323396.2136.5.camel@altera.com> (raw)
In-Reply-To: <CAPnjgZ3RYiu76f6y+YTObnj+mQW=UZpq_Fo_mCn2Lj=CTgMunA@mail.gmail.com>

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@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@altera.com>
> > Cc: Marek Vasut <marex@denx.de>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Tom Rini <trini@konsulko.com>
> > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > Cc: Tien Fong Chee <tfchee@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

      reply	other threads:[~2016-08-04 15:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  3:24 [U-Boot] [PATCH] malloc_simple: Add simple malloc free function Chin Liang See
2016-08-03  6:58 ` Marek Vasut
2016-08-03  7:30   ` Chin Liang See
2016-08-03  7:53     ` Marek Vasut
2016-08-03 13:41       ` Chin Liang See
2016-08-03 13:57         ` Marek Vasut
2016-08-03 15:22           ` Chin Liang See
2016-08-04  5:30             ` Marek Vasut
2016-08-04 15:12               ` Chin Liang See
2016-08-04 15:26                 ` Marek Vasut
2016-08-04  1:17 ` Simon Glass
2016-08-04 15:09   ` Chin Liang See [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470323396.2136.5.camel@altera.com \
    --to=clsee@altera.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox