From 75fee4535d1a9741474b53bd46a3585ad3c66eb5 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 11 Nov 2002 03:02:20 +0000 Subject: Back out use of palloc0 in place if palloc/MemSet. Seems constant len to MemSet is a performance boost. --- contrib/intarray/_int.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'contrib/intarray') diff --git a/contrib/intarray/_int.c b/contrib/intarray/_int.c index 325d504d84..dc674e09ff 100644 --- a/contrib/intarray/_int.c +++ b/contrib/intarray/_int.c @@ -916,8 +916,10 @@ new_intArrayType(int num) ArrayType *r; int nbytes = ARR_OVERHEAD(NDIM) + sizeof(int) * num; - r = (ArrayType *) palloc0(nbytes); + r = (ArrayType *) palloc(nbytes); + MemSet(r, 0, nbytes); + ARR_SIZE(r) = nbytes; ARR_NDIM(r) = NDIM; ARR_ELEMTYPE(r) = INT4OID; -- cgit v1.2.3