mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Initial pgindent and pgperltidy run for v13.
Includes some manual cleanup of places that pgindent messed up,
most of which weren't per project style anyway.
Notably, it seems some people didn't absorb the style rules of
commit c9d297751, because there were a bunch of new occurrences
of function calls with a newline just after the left paren, all
with faulty expectations about how the rest of the call would get
indented.
This commit is contained in:
@@ -560,7 +560,7 @@ AllocSetReset(MemoryContext context)
|
||||
AllocSet set = (AllocSet) context;
|
||||
AllocBlock block;
|
||||
Size keepersize PG_USED_FOR_ASSERTS_ONLY
|
||||
= set->keeper->endptr - ((char *) set);
|
||||
= set->keeper->endptr - ((char *) set);
|
||||
|
||||
AssertArg(AllocSetIsValid(set));
|
||||
|
||||
@@ -599,7 +599,7 @@ AllocSetReset(MemoryContext context)
|
||||
else
|
||||
{
|
||||
/* Normal case, release the block */
|
||||
context->mem_allocated -= block->endptr - ((char*) block);
|
||||
context->mem_allocated -= block->endptr - ((char *) block);
|
||||
|
||||
#ifdef CLOBBER_FREED_MEMORY
|
||||
wipe_mem(block, block->freeptr - ((char *) block));
|
||||
@@ -628,7 +628,7 @@ AllocSetDelete(MemoryContext context)
|
||||
AllocSet set = (AllocSet) context;
|
||||
AllocBlock block = set->blocks;
|
||||
Size keepersize PG_USED_FOR_ASSERTS_ONLY
|
||||
= set->keeper->endptr - ((char *) set);
|
||||
= set->keeper->endptr - ((char *) set);
|
||||
|
||||
AssertArg(AllocSetIsValid(set));
|
||||
|
||||
@@ -1032,7 +1032,7 @@ AllocSetFree(MemoryContext context, void *pointer)
|
||||
if (block->next)
|
||||
block->next->prev = block->prev;
|
||||
|
||||
context->mem_allocated -= block->endptr - ((char*) block);
|
||||
context->mem_allocated -= block->endptr - ((char *) block);
|
||||
|
||||
#ifdef CLOBBER_FREED_MEMORY
|
||||
wipe_mem(block, block->freeptr - ((char *) block));
|
||||
@@ -1124,7 +1124,7 @@ AllocSetRealloc(MemoryContext context, void *pointer, Size size)
|
||||
|
||||
/* Do the realloc */
|
||||
blksize = chksize + ALLOC_BLOCKHDRSZ + ALLOC_CHUNKHDRSZ;
|
||||
oldblksize = block->endptr - ((char *)block);
|
||||
oldblksize = block->endptr - ((char *) block);
|
||||
|
||||
block = (AllocBlock) realloc(block, blksize);
|
||||
if (block == NULL)
|
||||
|
||||
@@ -469,7 +469,7 @@ MemoryContextIsEmpty(MemoryContext context)
|
||||
Size
|
||||
MemoryContextMemAllocated(MemoryContext context, bool recurse)
|
||||
{
|
||||
Size total = context->mem_allocated;
|
||||
Size total = context->mem_allocated;
|
||||
|
||||
AssertArg(MemoryContextIsValid(context));
|
||||
|
||||
|
||||
@@ -217,10 +217,11 @@ SlabContextCreate(MemoryContext parent,
|
||||
headerSize = offsetof(SlabContext, freelist) + freelistSize;
|
||||
|
||||
#ifdef MEMORY_CONTEXT_CHECKING
|
||||
|
||||
/*
|
||||
* With memory checking, we need to allocate extra space for the bitmap
|
||||
* of free chunks. The bitmap is an array of bools, so we don't need to
|
||||
* worry about alignment.
|
||||
* With memory checking, we need to allocate extra space for the bitmap of
|
||||
* free chunks. The bitmap is an array of bools, so we don't need to worry
|
||||
* about alignment.
|
||||
*/
|
||||
headerSize += chunksPerBlock * sizeof(bool);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user