Re: rethinking dense_alloc (HashJoin) as a memory context - Mailing list pgsql-hackers

From Tom Lane
Subject Re: rethinking dense_alloc (HashJoin) as a memory context
Date
Msg-id 22452.1468852322@sss.pgh.pa.us
Whole thread Raw
In response to Re: rethinking dense_alloc (HashJoin) as a memory context  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> I wonder if we could go further. If we don't imagine having a very
> large number of allocators then we could just ask each one in turn if
> this block is one of theirs and which context it came from. That would
> allow an allocator that just allocated everything in a contiguous
> block to recognize pointers and return the memory context just by the
> range the pointer lies in.

The performance problem is not "large number of allocators", it's "large
number of distinct memory ranges".  Also, this will fail utterly to
recognize duplicate-pfree and bad-pointer cases.  Not that the existing
method is bulletproof, but this way has zero robustness against caller
bugs.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: DO with a large amount of statements get stuck with high memory consumption
Next
From: Jan Wieck
Date:
Subject: Re: DO with a large amount of statements get stuck with high memory consumption