mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
pgindent run.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.50 2003/07/25 20:17:56 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.51 2003/08/04 00:43:27 momjian Exp $
|
||||
*
|
||||
* NOTE:
|
||||
* This is a new (Feb. 05, 1999) implementation of the allocation set
|
||||
@@ -333,8 +333,8 @@ AllocSetContextCreate(MemoryContext parent,
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||
errmsg("out of memory"),
|
||||
errdetail("Failed while creating memory context \"%s\".",
|
||||
name)));
|
||||
errdetail("Failed while creating memory context \"%s\".",
|
||||
name)));
|
||||
}
|
||||
block->aset = context;
|
||||
block->freeptr = ((char *) block) + ALLOC_BLOCKHDRSZ;
|
||||
@@ -376,7 +376,7 @@ AllocSetInit(MemoryContext context)
|
||||
* Actually, this routine has some discretion about what to do.
|
||||
* It should mark all allocated chunks freed, but it need not necessarily
|
||||
* give back all the resources the set owns. Our actual implementation is
|
||||
* that we hang onto any "keeper" block specified for the set. In this way,
|
||||
* that we hang onto any "keeper" block specified for the set. In this way,
|
||||
* we don't thrash malloc() when a context is repeatedly reset after small
|
||||
* allocations, which is typical behavior for per-tuple contexts.
|
||||
*/
|
||||
@@ -708,13 +708,13 @@ AllocSetAlloc(MemoryContext context, Size size)
|
||||
block->endptr = ((char *) block) + blksize;
|
||||
|
||||
/*
|
||||
* If this is the first block of the set, make it the "keeper" block.
|
||||
* Formerly, a keeper block could only be created during context
|
||||
* creation, but allowing it to happen here lets us have fast reset
|
||||
* cycling even for contexts created with minContextSize = 0; that
|
||||
* way we don't have to force space to be allocated in contexts that
|
||||
* might never need any space. Don't mark an oversize block as
|
||||
* a keeper, however.
|
||||
* If this is the first block of the set, make it the "keeper"
|
||||
* block. Formerly, a keeper block could only be created during
|
||||
* context creation, but allowing it to happen here lets us have
|
||||
* fast reset cycling even for contexts created with
|
||||
* minContextSize = 0; that way we don't have to force space to be
|
||||
* allocated in contexts that might never need any space. Don't
|
||||
* mark an oversize block as a keeper, however.
|
||||
*/
|
||||
if (set->blocks == NULL && blksize == set->initBlockSize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user