From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][PATCH] Update malloc to dlmalloc version 2.8.4
Date: Wed, 8 Jul 2009 14:57:28 -0400 [thread overview]
Message-ID: <200907081457.30259.vapier@gentoo.org> (raw)
In-Reply-To: <4A5443A2.5050509@xes-inc.com>
On Wednesday 08 July 2009 02:58:42 Peter Tyser wrote:
> Robin Getz wrote:
> > On Wed 8 Jul 2009 01:58, Mike Frysinger pondered:
> >> On Tuesday 07 July 2009 18:24:56 Kumar Gala wrote:
> >>> On Jul 7, 2009, at 3:25 PM, Scott Wood wrote:
> >>>> Jean-Christophe PLAGNIOL-VILLARD wrote:
> >>>>> On 15:02 Tue 07 Jul , Scott Wood wrote:
> >>>>>> Kumar Gala wrote:
> >>>>>>> Those would help if the data structs had gotten bigger. In this
> >>>>>>> case the code itself is just larger.
> >>>>>>
> >>>>>> Perhaps we should look into using/writing a malloc implementation
> >>>>>> that takes a space/speed tradeoff more in line with U-boot's
> >>>>>> requirements (using a simple first-fit linear scan of free blocks,
> >>>>>> for example) -- and hopefully more readable than dlmalloc?
> >>>>>>
> >>>>>> I nominate those with the tightest space requirements to do
> >>>>>> this. :-)
> >>>>>
> >>>>> I agree it's sound a better plan
> >>>>> but I'll take a lot's of time
> >>>
> >>> Do we think there is some other project that we can acquire one from?
> >>
> >> there was another public domain malloc implementation Robin pointed me
> >> to recently, but i cant seem to remember/find it.
> >
> > It was bget
> >
> > http://www.fourmilab.ch/bget/
>
> The CFE bootloader has a pretty simple malloc implementation. It looks
> relatively readable and is much smaller than dlmalloc:
>
> ptyser at petert cfe$ size cfe30/lib_malloc.o
> text data bss dec hex filename
> 1128 4 0 1132 46c cfe30/lib_malloc.o
>
> http://www.broadcom.com/support/communications_processors/downloads.php
>
> Some other liberally licensed bootloaders such as PMON2000 might have
> some basic implementations too.
it's trivial to find smaller implementations. i guess the problem we have is
that we dont have any guidelines for what we want out of a malloc
implementation. i would bet that dlmalloc fairs better than these simple
implementations wrt fragmentation, re-use, and freeing. but if our typical u-
boot usage does little malloc/free, then this better behavior doesnt really
matter to us.
does dlmalloc have any compile time knobs to help direct the functionality
actually desired ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090708/7eec9f4b/attachment.pgp
next prev parent reply other threads:[~2009-07-08 18:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 16:27 [U-Boot] [RFC][PATCH] Update malloc to dlmalloc version 2.8.4 Kumar Gala
2009-07-07 16:30 ` Kumar Gala
2009-07-07 18:34 ` Mike Frysinger
2009-07-07 19:16 ` T Ziomek
2009-07-07 19:50 ` Kumar Gala
2009-07-07 20:02 ` Scott Wood
2009-07-07 20:22 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-07 20:25 ` Scott Wood
2009-07-07 22:24 ` Kumar Gala
2009-07-08 5:58 ` Mike Frysinger
2009-07-08 6:22 ` Robin Getz
2009-07-08 6:58 ` Peter Tyser
2009-07-08 18:57 ` Mike Frysinger [this message]
2009-07-07 20:39 ` T Ziomek
2009-07-07 20:47 ` Kim Phillips
2009-07-07 19:49 ` Kumar Gala
2009-07-08 4:37 ` Robin Getz
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=200907081457.30259.vapier@gentoo.org \
--to=vapier@gentoo.org \
--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