aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/mmgr/slab.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-10-28 09:19:06 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-10-28 09:19:06 +0200
commitb1099eca8f38ff5cfaf0901bb91cb6a22f909bc6 (patch)
tree8ef29d9ee5911b059c8ecd2123b50c411cfc7a9e /src/backend/utils/mmgr/slab.c
parentd37aa3d35832afde94e100c4d2a9618b3eb76472 (diff)
downloadpostgresql-b1099eca8f38ff5cfaf0901bb91cb6a22f909bc6.tar.gz
postgresql-b1099eca8f38ff5cfaf0901bb91cb6a22f909bc6.zip
Remove AssertArg and AssertState
These don't offer anything over plain Assert, and their usage had already been declared obsolescent. Author: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/20221009210148.GA900071@nathanxps13
Diffstat (limited to 'src/backend/utils/mmgr/slab.c')
-rw-r--r--src/backend/utils/mmgr/slab.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index 1a0b28f9ea1..6df0839b6ac 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -254,7 +254,7 @@ SlabReset(MemoryContext context)
SlabContext *slab = (SlabContext *) context;
int i;
- AssertArg(SlabIsValid(slab));
+ Assert(SlabIsValid(slab));
#ifdef MEMORY_CONTEXT_CHECKING
/* Check for corruption and leaks before freeing */
@@ -313,7 +313,7 @@ SlabAlloc(MemoryContext context, Size size)
MemoryChunk *chunk;
int idx;
- AssertArg(SlabIsValid(slab));
+ Assert(SlabIsValid(slab));
Assert((slab->minFreeChunks >= 0) &&
(slab->minFreeChunks < slab->chunksPerBlock));
@@ -475,7 +475,7 @@ SlabFree(void *pointer)
* Future field experience may show that this Assert had better become a
* regular runtime test-and-elog check.
*/
- AssertArg(SlabBlockIsValid(block));
+ Assert(SlabBlockIsValid(block));
slab = block->slab;
#ifdef MEMORY_CONTEXT_CHECKING
@@ -593,7 +593,7 @@ SlabGetChunkContext(void *pointer)
MemoryChunk *chunk = PointerGetMemoryChunk(pointer);
SlabBlock *block = MemoryChunkGetBlock(chunk);
- AssertArg(SlabBlockIsValid(block));
+ Assert(SlabBlockIsValid(block));
return &block->slab->header;
}
@@ -609,7 +609,7 @@ SlabGetChunkSpace(void *pointer)
SlabBlock *block = MemoryChunkGetBlock(chunk);
SlabContext *slab;
- AssertArg(SlabBlockIsValid(block));
+ Assert(SlabBlockIsValid(block));
slab = block->slab;
return slab->fullChunkSize;
@@ -624,7 +624,7 @@ SlabIsEmpty(MemoryContext context)
{
SlabContext *slab = (SlabContext *) context;
- AssertArg(SlabIsValid(slab));
+ Assert(SlabIsValid(slab));
return (slab->nblocks == 0);
}
@@ -651,7 +651,7 @@ SlabStats(MemoryContext context,
Size freespace = 0;
int i;
- AssertArg(SlabIsValid(slab));
+ Assert(SlabIsValid(slab));
/* Include context header in totalspace */
totalspace = slab->headerSize;
@@ -709,7 +709,7 @@ SlabCheck(MemoryContext context)
int i;
const char *name = slab->header.name;
- AssertArg(SlabIsValid(slab));
+ Assert(SlabIsValid(slab));
Assert(slab->chunksPerBlock > 0);
/* walk all the freelists */