On Tue, Jul 18, 2023 at 06:05:11PM +0200, Alvaro Herrera wrote:
> On 2023-Jul-17, Nathan Bossart wrote:
>
>> @@ -35,7 +42,11 @@ binaryheap_allocate(int capacity, binaryheap_comparator compare, void *arg)
>> binaryheap *heap;
>>
>> sz = offsetof(binaryheap, bh_nodes) + sizeof(Datum) * capacity;
>> +#ifdef FRONTEND
>> + heap = (binaryheap *) pg_malloc(sz);
>> +#else
>> heap = (binaryheap *) palloc(sz);
>> +#endif
>
> Hmm, as I recall fe_memutils.c provides you with palloc() in the
> frontend environment, so you don't actually need this one.
Ah, yes it does. Thanks for the pointer.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com