aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/mmgr/slab.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-04-23 15:27:37 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-04-23 15:27:37 -0400
commitee88ef55dbacfca15ad425e849280669e3d6ee4d (patch)
tree6b8f357970e5e930a3579d52d0b4e443ea39d3bb /src/backend/utils/mmgr/slab.c
parent5b0aa112a8f74e93d28c2dc002cfdaea5c40eeda (diff)
downloadpostgresql-ee88ef55dbacfca15ad425e849280669e3d6ee4d.tar.gz
postgresql-ee88ef55dbacfca15ad425e849280669e3d6ee4d.zip
Remove useless (and broken) logging logic in memory context functions.
Nobody really uses this stuff, especially not since we created valgrind-based infrastructure that does the same thing better. It is thus unsurprising that the generation.c and slab.c versions were actually broken. Rather than fix 'em, let's just remove 'em. Alexander Lakhin Discussion: https://postgr.es/m/8936216c-3492-3f6e-634b-d638fddc5f91@gmail.com
Diffstat (limited to 'src/backend/utils/mmgr/slab.c')
-rw-r--r--src/backend/utils/mmgr/slab.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index c928476c479..e9e962d7674 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -157,22 +157,6 @@ static const MemoryContextMethods SlabMethods = {
#endif
};
-/* ----------
- * Debug macros
- * ----------
- */
-#ifdef HAVE_ALLOCINFO
-#define SlabFreeInfo(_cxt, _chunk) \
- fprintf(stderr, "SlabFree: %s: %p, %zu\n", \
- (_cxt)->header.name, (_chunk), (_chunk)->header.size)
-#define SlabAllocInfo(_cxt, _chunk) \
- fprintf(stderr, "SlabAlloc: %s: %p, %zu\n", \
- (_cxt)->header.name, (_chunk), (_chunk)->header.size)
-#else
-#define SlabFreeInfo(_cxt, _chunk)
-#define SlabAllocInfo(_cxt, _chunk)
-#endif
-
/*
* SlabContextCreate
@@ -499,8 +483,6 @@ SlabAlloc(MemoryContext context, Size size)
randomize_mem((char *) SlabChunkGetPointer(chunk), size);
#endif
- SlabAllocInfo(slab, chunk);
-
Assert(slab->nblocks * slab->blockSize == context->mem_allocated);
return SlabChunkGetPointer(chunk);
@@ -518,8 +500,6 @@ SlabFree(MemoryContext context, void *pointer)
SlabChunk *chunk = SlabPointerGetChunk(pointer);
SlabBlock *block = chunk->block;
- SlabFreeInfo(slab, chunk);
-
#ifdef MEMORY_CONTEXT_CHECKING
/* Test for someone scribbling on unused space in chunk */
if (slab->chunkSize < (slab->fullChunkSize - sizeof(SlabChunk)))