From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
David Michael Barr <david.barr@cordelta.com>
Subject: Re: [PATCH 4/7] Add a memory pool library
Date: Sun, 30 May 2010 04:55:37 -0500 [thread overview]
Message-ID: <20100530095537.GA6242@progeny.tock> (raw)
In-Reply-To: <AANLkTiltqraEFzYohs_89VbJQsevQC3Yp5RYWSe4b3jd@mail.gmail.com>
Hi Ram,
Ramkumar Ramachandra wrote:
> I've never used talloc. What basis can we use for the comparison?
Ah, a little explanation is in order.
You see, I read the commit message, having just looked at the treap
implementation, read the word “allocator”, and decided that a
mini-malloc was exactly the sort of thing I did not want to read right
then. Hence the silly comment about some allocator that pools memory
for heterogeneous-sized blocks (which is very nice and convenient, but
not so relevant!). Sorry --- I should not have been so lazy.
In fact, this patch just maintains a growing array of never-freed
fixed-size blocks. It is very similar to the existing alloc.c but
with some small differences:
. uses a single memory area that grows with realloc, so it can be
freed for valgrind-cleanness if one wants.
. grows a little more aggressively, as David pointed out
And it is much simpler than I was thinking, so honestly, I don’t
even mind the code duplication so much.
For interest, the analogous CCAN module is
http://ccan.ozlabs.org/info/block_pool.html
> On a related note, note that while compiling, a lot of
> unused functions are generated which pop up as compiler warnings
Maybe __attribute__((__unused__)) could work.
Sorry for the nonsense,
Jonathan
next prev parent reply other threads:[~2010-05-30 9:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-23 21:40 [PATCH 0/7] Import David's SVN exporter Ramkumar Ramachandra
2010-05-23 21:40 ` [WIP PATCH 1/7] Add skeleton remote helper for SVN Ramkumar Ramachandra
2010-05-23 21:40 ` [PATCH 2/7] Add cpp macro implementation of treaps Ramkumar Ramachandra
2010-05-29 7:18 ` Jonathan Nieder
2010-05-30 9:09 ` Ramkumar Ramachandra
2010-05-30 9:31 ` Jonathan Nieder
2010-05-30 9:33 ` Ramkumar Ramachandra
2010-05-23 21:40 ` [PATCH 3/7] Add buffer pool library Ramkumar Ramachandra
2010-05-24 7:47 ` Peter Baumann
2010-05-24 10:11 ` Ramkumar Ramachandra
2010-05-24 10:37 ` David Michael Barr
2010-05-29 8:51 ` Jonathan Nieder
2010-05-29 10:55 ` David Michael Barr
2010-05-23 21:40 ` [PATCH 4/7] Add a memory " Ramkumar Ramachandra
2010-05-29 9:06 ` Jonathan Nieder
2010-05-30 9:12 ` Ramkumar Ramachandra
2010-05-30 9:55 ` Jonathan Nieder [this message]
2010-05-30 10:51 ` Ramkumar Ramachandra
2010-05-23 21:40 ` [PATCH 5/7] Add API for string-specific memory pool Ramkumar Ramachandra
2010-05-29 11:38 ` Jonathan Nieder
2010-05-30 9:38 ` Ramkumar Ramachandra
2010-05-30 10:09 ` Jonathan Nieder
2010-05-30 16:52 ` Ramkumar Ramachandra
2010-05-23 21:40 ` [PATCH 6/7] Add SVN revision parser and exporter Ramkumar Ramachandra
2010-05-29 14:06 ` Jonathan Nieder
2010-05-30 15:58 ` Ramkumar Ramachandra
2010-05-23 21:40 ` [PATCH 7/7] Add handler for SVN dump Ramkumar Ramachandra
2010-05-30 8:59 ` Jonathan Nieder
2010-05-30 10:45 ` Ramkumar Ramachandra
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=20100530095537.GA6242@progeny.tock \
--to=jrnieder@gmail.com \
--cc=artagnon@gmail.com \
--cc=david.barr@cordelta.com \
--cc=git@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).