Re: [HACKERS] sb_alloc: a new memory allocator for PostgreSQL

2014-05-06 Thread Greg Stark
On Tue, May 6, 2014 at 2:04 PM, Robert Haas robertmh...@gmail.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

Re: [HACKERS] sb_alloc: a new memory allocator for PostgreSQL

2014-05-06 Thread Heikki Linnakangas
On 05/06/2014 04:04 PM, Robert Haas wrote: Over the last several months, I've been working on a new memory allocator for PostgreSQL. While it's not done, and there are problems, I think I've reached the point where it makes sense to get this out in front of a wider audience and get some

Re: [HACKERS] sb_alloc: a new memory allocator for PostgreSQL

2014-05-06 Thread Robert Haas
On Tue, May 6, 2014 at 9:31 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: As a generic remark, I wish that whatever parallel algorithms we will use won't need a lot of ad hoc memory allocations from shared memory. Even though we have dynamic shared memory now, complex data structures

Re: [HACKERS] sb_alloc: a new memory allocator for PostgreSQL

2014-05-06 Thread Robert Haas
On Tue, May 6, 2014 at 9:25 AM, Greg Stark st...@mit.edu wrote: On Tue, May 6, 2014 at 2:04 PM, Robert Haas robertmh...@gmail.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.

Re: [HACKERS] sb_alloc: a new memory allocator for PostgreSQL

2014-05-06 Thread Simon Riggs
On 6 May 2014 14:49, Robert Haas robertmh...@gmail.com wrote: On Tue, May 6, 2014 at 9:31 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: As a generic remark, I wish that whatever parallel algorithms we will use won't need a lot of ad hoc memory allocations from shared memory. Even

Re: [HACKERS] sb_alloc: a new memory allocator for PostgreSQL

2014-05-06 Thread Robert Haas
On Tue, May 6, 2014 at 10:40 AM, Simon Riggs si...@2ndquadrant.com wrote: 1. Segments are relocatable, so you can't actually use absolute pointers. Maybe someday we'll have a facility for dynamic shared memory segments that are mapped at the same address in every process, or maybe not, but