diff options
author | Michael Paquier | 2025-03-04 01:53:10 +0000 |
---|---|---|
committer | Michael Paquier | 2025-03-04 01:53:10 +0000 |
commit | 40d3f8274499cb1dd349f60f2e5915f907acce6e (patch) | |
tree | 4b36a85c4044ef1c6efb8884d80c91145139adfc /src/include/utils/backend_status.h | |
parent | ba57dcfdcda824e92eeb30b8863be8bf784908a8 (diff) |
Add more assertions in palloc0() and palloc_extended()
palloc() includes an assertion checking that an alloc() implementation
never returns NULL for all MemoryContextMethods.
This commit adds a similar assertion in palloc0(). In palloc_extend(),
a different assertion is added, checking that MCXT_ALLOC_NO_OOM is set
when an alloc() routine returns NULL. These additions can be useful to
catch errors when implementing a new set of MemoryContextMethods
routines.
Author: Andreas Karlsson <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include/utils/backend_status.h')
0 files changed, 0 insertions, 0 deletions