Re: sb_alloc: a new memory allocator for PostgreSQL

From: Greg Stark <stark(at)mit(dot)edu>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sb_alloc: a new memory allocator for PostgreSQL
Date: 2014-05-06 13:25:47
Message-ID: CAM-w4HPBgoLcaT-xqEXzVg9ONVSn1AB_Z7qbSxN_iN1JccmJJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 6, 2014 at 2:04 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> I also didn't find anything that looked like our
> memory context paradigm, and in particular the ability to cheaply
> reset a context, in any other allocator.

You probably knew this but just in case the term for this strategy is
called a "ripcord allocator". I believe GCC had one, not sure if it
still uses it. I doubt any existing ones are especially helpful though
compared to looking at regular allocators and seeing how to integrate
them.

I assume you're also aware of lock-free data structures and the like.
A memory allocator seems like something that needs to be super aware
of causing concurrency bottlenecks since it has no idea where it'll be
used.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-05-06 13:31:13 Re: sb_alloc: a new memory allocator for PostgreSQL
Previous Message Noah Misch 2014-05-06 13:22:20 Re: [PATCH] `pg_dump -Fd` doesn't check write return status...