Re: Add assertion for failed alloc to palloc0() and palloc_extended()

2025-03-04 Thread Andreas Karlsson
On 3/4/25 3:01 AM, Michael Paquier wrote: On Mon, Mar 03, 2025 at 01:13:05PM +0900, Michael Paquier wrote: In short, LGTM. Will apply if there are no objections. And applied as 40d3f8274499. Thanks! Andreas

Re: Add assertion for failed alloc to palloc0() and palloc_extended()

2025-03-03 Thread Michael Paquier
On Mon, Mar 03, 2025 at 01:13:05PM +0900, Michael Paquier wrote: > In short, LGTM. Will apply if there are no objections. And applied as 40d3f8274499. -- Michael signature.asc Description: PGP signature

Re: Add assertion for failed alloc to palloc0() and palloc_extended()

2025-03-02 Thread Michael Paquier
On Sat, Mar 01, 2025 at 01:05:43AM +0100, Andreas Karlsson wrote: > I noticed that we have Assert(ret != NULL) in palloc() but not in palloc0() > so for consistency I decided to add it. I also added an assertion that the > MCXT_ALLOC_NO_OOM flag is set if alloc() returns > NULL to palloc_extended()

Add assertion for failed alloc to palloc0() and palloc_extended()

2025-02-28 Thread Andreas Karlsson
for failed alloc to palloc0() and palloc_extended() The palloc() call asserts that the alloc function does not return NULL so do the same in palloc0(). In palloc_extend() we can assert the same as long as the MCXT_ALLOC_NO_OOM flag is not set, so let's do so. --- src/backend/utils/mmgr/mcxt.