diff options
| author | Tom Lane | 2000-05-21 02:23:30 +0000 |
|---|---|---|
| committer | Tom Lane | 2000-05-21 02:23:30 +0000 |
| commit | aa1617911836bd8f500320a365d59920fca2613b (patch) | |
| tree | aad6018f3a1cf8b07ff4b06ca00fef3a35c4e1f6 /src/include | |
| parent | 25a7a7f4469f3c861fbbe72733560dba71ae8ea7 (diff) | |
Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS is
defined then statistics about memory usage of all the global memory
contexts are printed after each commit.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/utils/mcxt.h | 3 | ||||
| -rw-r--r-- | src/include/utils/memutils.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/include/utils/mcxt.h b/src/include/utils/mcxt.h index 2f7ae1cf5d3..7b867d86649 100644 --- a/src/include/utils/mcxt.h +++ b/src/include/utils/mcxt.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: mcxt.h,v 1.16 2000/01/26 05:58:38 momjian Exp $ + * $Id: mcxt.h,v 1.17 2000/05/21 02:23:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -54,6 +54,7 @@ extern void MemoryContextFree(MemoryContext context, Pointer pointer); extern MemoryContext MemoryContextSwitchTo(MemoryContext context); extern GlobalMemory CreateGlobalMemory(char *name); extern void GlobalMemoryDestroy(GlobalMemory context); +extern void GlobalMemoryStats(void); #endif /* MCXT_H */ diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h index a42bce402cd..3e6ad2e53da 100644 --- a/src/include/utils/memutils.h +++ b/src/include/utils/memutils.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: memutils.h,v 1.34 2000/04/12 17:16:55 momjian Exp $ + * $Id: memutils.h,v 1.35 2000/05/21 02:23:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -224,6 +224,7 @@ extern AllocPointer AllocSetRealloc(AllocSet set, AllocPointer pointer, Size size); extern void AllocSetDump(AllocSet set); +extern void AllocSetStats(AllocSet set, const char *ident); #endif /* MEMUTILS_H */ |
