1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

Back out use of palloc0 in place if palloc/MemSet. Seems constant len

to MemSet is a performance boost.
This commit is contained in:
Bruce Momjian
2002-11-11 03:02:20 +00:00
parent 5d283d89cb
commit 75fee4535d
38 changed files with 212 additions and 110 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.38 2002/11/10 07:25:13 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.39 2002/11/11 03:02:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,9 +50,11 @@ ExtractSortKeys(Sort *sortnode,
*/
if (keycount <= 0)
elog(ERROR, "ExtractSortKeys: keycount <= 0");
sortOps = (Oid *) palloc0(keycount * sizeof(Oid));
sortOps = (Oid *) palloc(keycount * sizeof(Oid));
MemSet(sortOps, 0, keycount * sizeof(Oid));
*sortOperators = sortOps;
attNos = (AttrNumber *) palloc0(keycount * sizeof(AttrNumber));
attNos = (AttrNumber *) palloc(keycount * sizeof(AttrNumber));
MemSet(attNos, 0, keycount * sizeof(AttrNumber));
*attNums = attNos;
/*