All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: davej@redhat.com, trinity@vger.kernel.org
Subject: Re: [PATCH trinity] trinity: use Boehm-Demers-Weiser's garbage collecting memory allocator
Date: Sun, 26 May 2013 11:51:24 +0200	[thread overview]
Message-ID: <51A1DB1C.7050301@redhat.com> (raw)
In-Reply-To: <1369511265-28552-1-git-send-email-dborkman@redhat.com>

On 05/25/2013 09:47 PM, Daniel Borkmann wrote:
> trinity currently quite often does not care about freeing memory on
> its own that was fetched through malloc(). Therefore it can happen if
> trinity runs for quite a long time, that oom-killer gets invoked. So
> for now use the Boehm-Demers-Weiser's garbage collecting memory
> allocator as a malloc replacement to avoid such situations.
>
> In this patch, we wrap all BDW functions into bdw_* equivalents, so that
> we could later on still #ifdef something if we want to and replace all
> calls based on the build. Calling bdw_free() is still legimite, but the
> memory is reclaimed via bdw_gcollect(), which would solve trinity's
> memory management.
>
> Dependency that we need when building (in case people don't want
> additional libs, follow-up patches could still #ifdef bdw_* wrappers
> to the glibc functions):
>
>    Fedora: yum install gc-devel
>
>    Debian: apt-get install libgc-dev
>
> More information on Boehm-Demers-Weiser allocator can be found here:
>
>    http://www.hpl.hp.com/personal/Hans_Boehm/gc/
>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Please ignore this for now, will send a further improved v2 soon.

      reply	other threads:[~2013-05-26  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25 19:47 [PATCH trinity] trinity: use Boehm-Demers-Weiser's garbage collecting memory allocator Daniel Borkmann
2013-05-26  9:51 ` Daniel Borkmann [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=51A1DB1C.7050301@redhat.com \
    --to=dborkman@redhat.com \
    --cc=davej@redhat.com \
    --cc=trinity@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.