summaryrefslogtreecommitdiff
path: root/contrib/pageinspect/heapfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pageinspect/heapfuncs.c')
-rw-r--r--contrib/pageinspect/heapfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c
index c13f07655c4..ca7bffdbea5 100644
--- a/contrib/pageinspect/heapfuncs.c
+++ b/contrib/pageinspect/heapfuncs.c
@@ -154,7 +154,7 @@ heap_page_items(PG_FUNCTION_ARGS)
fctx = SRF_FIRSTCALL_INIT();
mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
- inter_call_data = palloc(sizeof(heap_page_items_state));
+ inter_call_data = palloc_object(heap_page_items_state);
/* Build a tuple descriptor for our result type */
if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
@@ -553,7 +553,7 @@ heap_tuple_infomask_flags(PG_FUNCTION_ARGS)
}
/* build set of raw flags */
- flags = (Datum *) palloc0(sizeof(Datum) * bitcnt);
+ flags = palloc0_array(Datum, bitcnt);
/* decode t_infomask */
if ((t_infomask & HEAP_HASNULL) != 0)