mirror of
https://github.com/postgres/postgres.git
synced 2025-11-29 23:43:17 +03:00
pgindent run for 9.0
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.82 2010/01/02 16:57:58 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.83 2010/02/26 02:01:14 momjian Exp $
|
||||
*
|
||||
* NOTE:
|
||||
* This is a new (Feb. 05, 1999) implementation of the allocation set
|
||||
@@ -286,13 +286,13 @@ AllocSetFreeIndex(Size size)
|
||||
tsize = (size - 1) >> ALLOC_MINBITS;
|
||||
|
||||
/*
|
||||
* At this point we need to obtain log2(tsize)+1, ie, the number
|
||||
* of not-all-zero bits at the right. We used to do this with a
|
||||
* shift-and-count loop, but this function is enough of a hotspot
|
||||
* to justify micro-optimization effort. The best approach seems
|
||||
* to be to use a lookup table. Note that this code assumes that
|
||||
* ALLOCSET_NUM_FREELISTS <= 17, since we only cope with two bytes
|
||||
* of the tsize value.
|
||||
* At this point we need to obtain log2(tsize)+1, ie, the number of
|
||||
* not-all-zero bits at the right. We used to do this with a
|
||||
* shift-and-count loop, but this function is enough of a hotspot to
|
||||
* justify micro-optimization effort. The best approach seems to be
|
||||
* to use a lookup table. Note that this code assumes that
|
||||
* ALLOCSET_NUM_FREELISTS <= 17, since we only cope with two bytes of
|
||||
* the tsize value.
|
||||
*/
|
||||
t = tsize >> 8;
|
||||
idx = t ? LogTable256[t] + 8 : LogTable256[tsize];
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.117 2010/02/18 03:06:46 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.118 2010/02/26 02:01:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -330,9 +330,9 @@ PortalReleaseCachedPlan(Portal portal)
|
||||
portal->cplan = NULL;
|
||||
|
||||
/*
|
||||
* We must also clear portal->stmts which is now a dangling
|
||||
* reference to the cached plan's plan list. This protects any
|
||||
* code that might try to examine the Portal later.
|
||||
* We must also clear portal->stmts which is now a dangling reference
|
||||
* to the cached plan's plan list. This protects any code that might
|
||||
* try to examine the Portal later.
|
||||
*/
|
||||
portal->stmts = NIL;
|
||||
}
|
||||
@@ -822,16 +822,16 @@ AtSubAbort_Portals(SubTransactionId mySubid,
|
||||
|
||||
/*
|
||||
* Any resources belonging to the portal will be released in the
|
||||
* upcoming transaction-wide cleanup; they will be gone before we
|
||||
* run PortalDrop.
|
||||
* upcoming transaction-wide cleanup; they will be gone before we run
|
||||
* PortalDrop.
|
||||
*/
|
||||
portal->resowner = NULL;
|
||||
|
||||
/*
|
||||
* Although we can't delete the portal data structure proper, we
|
||||
* can release any memory in subsidiary contexts, such as executor
|
||||
* state. The cleanup hook was the last thing that might have
|
||||
* needed data there.
|
||||
* Although we can't delete the portal data structure proper, we can
|
||||
* release any memory in subsidiary contexts, such as executor state.
|
||||
* The cleanup hook was the last thing that might have needed data
|
||||
* there.
|
||||
*/
|
||||
MemoryContextDeleteChildren(PortalGetHeapMemory(portal));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user