diff options
Diffstat (limited to 'src/backend/utils/mmgr')
-rw-r--r-- | src/backend/utils/mmgr/aset.c | 12 | ||||
-rw-r--r-- | src/backend/utils/mmgr/mcxt.c | 6 | ||||
-rw-r--r-- | src/backend/utils/mmgr/oset.c | 4 | ||||
-rw-r--r-- | src/backend/utils/mmgr/portalmem.c | 20 |
4 files changed, 31 insertions, 11 deletions
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c index 41908232065..8e0482de38c 100644 --- a/src/backend/utils/mmgr/aset.c +++ b/src/backend/utils/mmgr/aset.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.4 1996/11/10 03:03:45 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.5 1997/08/19 21:35:54 momjian Exp $ * * NOTE * XXX This is a preliminary implementation which lacks fail-fast @@ -25,6 +25,10 @@ # include <string.h> #endif +static void AllocPointerDump(AllocPointer pointer); +static int AllocSetIterate(AllocSet set, + void (*function)(AllocPointer pointer)); + #undef AllocSetReset #undef malloc #undef free @@ -273,7 +277,7 @@ AllocSetRealloc(AllocSet set, AllocPointer pointer, Size size) * Exceptions: * BadArg if set is invalid. */ -int +static int AllocSetIterate(AllocSet set, void (*function)(AllocPointer pointer)) { @@ -295,6 +299,7 @@ AllocSetIterate(AllocSet set, return (count); } +#ifdef NOT_USED int AllocSetCount(AllocSet set) { @@ -310,6 +315,7 @@ AllocSetCount(AllocSet set) } return count; } +#endif /* * Private routines @@ -367,7 +373,7 @@ AllocPointerGetNext(AllocPointer pointer) * XXX AllocPointerDump -- * Displays allocated pointer. */ -void +static void AllocPointerDump(AllocPointer pointer) { printf("\t%-10ld@ %0#lx\n", ((long*)pointer)[-1], (long)pointer); /* XXX */ diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index e03948ff04e..df2eb480817 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.2 1996/11/08 06:00:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.3 1997/08/19 21:35:57 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -281,6 +281,7 @@ MemoryContextRealloc(MemoryContext context, * ??? * BadArgumentsErr if firstTime is true for subsequent calls. */ +#ifdef NOT_USED char* MemoryContextGetName(MemoryContext context) { @@ -289,6 +290,7 @@ MemoryContextGetName(MemoryContext context) return (context->method->getName(context)); } +#endif /* * PointerGetAllocSize -- @@ -301,6 +303,7 @@ MemoryContextGetName(MemoryContext context) * ??? * BadArgumentsErr if firstTime is true for subsequent calls. */ +#ifdef NOT_USED Size PointerGetAllocSize(Pointer pointer) { @@ -309,6 +312,7 @@ PointerGetAllocSize(Pointer pointer) return (PSIZE(pointer)); } +#endif /* * MemoryContextSwitchTo -- diff --git a/src/backend/utils/mmgr/oset.c b/src/backend/utils/mmgr/oset.c index 478fe1516ab..d413cb5cb6f 100644 --- a/src/backend/utils/mmgr/oset.c +++ b/src/backend/utils/mmgr/oset.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.1.1.1 1996/07/09 06:22:09 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.2 1997/08/19 21:35:59 momjian Exp $ * * NOTE * XXX This is a preliminary implementation which lacks fail-fast @@ -89,6 +89,7 @@ OrderedSetGetHead(OrderedSet set) /* * OrderedSetGetTail -- */ +#ifdef NOT_USED Pointer OrderedSetGetTail(OrderedSet set) { @@ -100,6 +101,7 @@ OrderedSetGetTail(OrderedSet set) } return (NULL); } +#endif /* * OrderedElemGetPredecessor -- diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 23e600ce244..7f1674d88db 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.4 1997/08/12 22:54:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.5 1997/08/19 21:36:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -91,6 +91,12 @@ #include "utils/portal.h" +static void CollectNamedPortals(Portal *portalP, int destroy); +static Portal PortalHeapMemoryGetPortal(PortalHeapMemory context); +static PortalVariableMemory PortalHeapMemoryGetVariableMemory(PortalHeapMemory context); +static void PortalResetHeapMemory(Portal portal); +static Portal PortalVariableMemoryGetPortal(PortalVariableMemory context); + /* ---------------- * ALLOCFREE_ERROR_ABORT * define this if you want a core dump when you try to @@ -413,7 +419,7 @@ PortalNameIsSpecial(char *pname) * entry *before* we destroy anything (destroying updates the hashtable * and screws up the sequential walk of the table). -mer 17 Aug 1992 */ -void +static void CollectNamedPortals(Portal *portalP, int destroy) { static Portal *portalList = (Portal *)NULL; @@ -800,7 +806,7 @@ PortalDestroy(Portal *portalP) * BadArg if mode is invalid. * ---------------- */ -void +static void PortalResetHeapMemory(Portal portal) { PortalHeapMemory context; @@ -929,7 +935,7 @@ PortalGetHeapMemory(Portal portal) * BadState if called when disabled. * BadArg if context is invalid. */ -Portal +static Portal PortalVariableMemoryGetPortal(PortalVariableMemory context) { return ((Portal)((char *)context - offsetof (PortalD, variable))); @@ -943,7 +949,7 @@ PortalVariableMemoryGetPortal(PortalVariableMemory context) * BadState if called when disabled. * BadArg if context is invalid. */ -Portal +static Portal PortalHeapMemoryGetPortal(PortalHeapMemory context) { return ((Portal)((char *)context - offsetof (PortalD, heap))); @@ -957,6 +963,7 @@ PortalHeapMemoryGetPortal(PortalHeapMemory context) * BadState if called when disabled. * BadArg if context is invalid. */ +#ifdef NOT_USED PortalHeapMemory PortalVariableMemoryGetHeapMemory(PortalVariableMemory context) { @@ -964,6 +971,7 @@ PortalVariableMemoryGetHeapMemory(PortalVariableMemory context) - offsetof (PortalD, variable) + offsetof (PortalD, heap))); } +#endif /* * PortalHeapMemoryGetVariableMemory -- @@ -973,7 +981,7 @@ PortalVariableMemoryGetHeapMemory(PortalVariableMemory context) * BadState if called when disabled. * BadArg if context is invalid. */ -PortalVariableMemory +static PortalVariableMemory PortalHeapMemoryGetVariableMemory(PortalHeapMemory context) { return ((PortalVariableMemory)((char *)context |