diff options
| author | Bruce Momjian | 2002-11-11 03:02:20 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2002-11-11 03:02:20 +0000 |
| commit | 75fee4535d1a9741474b53bd46a3585ad3c66eb5 (patch) | |
| tree | de4500a8b76fdb882f055ad7bd8889be9d51c790 /contrib/intarray | |
| parent | 5d283d89cb6142d721c095c28be19056ad620616 (diff) | |
Back out use of palloc0 in place if palloc/MemSet. Seems constant len
to MemSet is a performance boost.
Diffstat (limited to 'contrib/intarray')
| -rw-r--r-- | contrib/intarray/_int.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |
