aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/memnodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/nodes/memnodes.h')
-rw-r--r--src/include/nodes/memnodes.h117
1 files changed, 60 insertions, 57 deletions
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index 594bff6db42..1d5bced1f3c 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -1,21 +1,21 @@
/*-------------------------------------------------------------------------
*
* memnodes.h--
- * POSTGRES memory context node definitions.
+ * POSTGRES memory context node definitions.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: memnodes.h,v 1.4 1996/11/04 07:59:34 scrappy Exp $
+ * $Id: memnodes.h,v 1.5 1997/09/07 04:58:35 momjian Exp $
*
* XXX the typedefs in this file are different from the other ???nodes.h;
- * they are pointers to structures instead of the structures themselves.
- * If you're wondering, this is plain laziness. I don't want to touch
- * the memory context code which should be revamped altogether some day.
- * - ay 10/94
+ * they are pointers to structures instead of the structures themselves.
+ * If you're wondering, this is plain laziness. I don't want to touch
+ * the memory context code which should be revamped altogether some day.
+ * - ay 10/94
*-------------------------------------------------------------------------
*/
-#ifndef MEMNODES_H
+#ifndef MEMNODES_H
#define MEMNODES_H
#include <lib/fstack.h>
@@ -24,75 +24,78 @@
/*
* MemoryContext --
- * A logical context in which memory allocations occur.
+ * A logical context in which memory allocations occur.
*
* The types of memory contexts can be thought of as members of the
* following inheritance hierarchy with properties summarized below.
*
- * Node
- * |
- * MemoryContext___
- * / \
- * GlobalMemory PortalMemoryContext
- * / \
- * PortalVariableMemory PortalHeapMemory
+ * Node
+ * |
+ * MemoryContext___
+ * / \
+ * GlobalMemory PortalMemoryContext
+ * / \
+ * PortalVariableMemory PortalHeapMemory
*
- * Flushed at Flushed at Checkpoints
- * Transaction Portal
- * Commit Close
+ * Flushed at Flushed at Checkpoints
+ * Transaction Portal
+ * Commit Close
*
- * GlobalMemory n n n
- * PortalVariableMemory n y n
- * PortalHeapMemory y y y
+ * GlobalMemory n n n
+ * PortalVariableMemory n y n
+ * PortalHeapMemory y y y
*/
-typedef struct MemoryContextMethodsData {
- Pointer (*alloc)();
- void (*free_p)(); /* need to use free as a #define,
- so can't use free */
- Pointer (*realloc)();
- char* (*getName)();
- void (*dump)();
-} *MemoryContextMethods;
+typedef struct MemoryContextMethodsData
+{
+ Pointer(*alloc) ();
+ void (*free_p) (); /* need to use free as a #define,
+ * so can't use free */
+ Pointer(*realloc) ();
+ char *(*getName) ();
+ void (*dump) ();
+} *MemoryContextMethods;
-typedef struct MemoryContext {
- NodeTag type;
- MemoryContextMethods method;
-} *MemoryContext;
+typedef struct MemoryContext
+{
+ NodeTag type;
+ MemoryContextMethods method;
+} *MemoryContext;
/* think about doing this right some time but we'll have explicit fields
for now -ay 10/94 */
-typedef struct GlobalMemory {
- NodeTag type;
- MemoryContextMethods method;
- AllocSetData setData;
- char *name;
- OrderedElemData elemData;
-} *GlobalMemory;
+typedef struct GlobalMemory
+{
+ NodeTag type;
+ MemoryContextMethods method;
+ AllocSetData setData;
+ char *name;
+ OrderedElemData elemData;
+} *GlobalMemory;
typedef MemoryContext *PortalMemoryContext;
-typedef struct PortalVariableMemory {
- NodeTag type;
- MemoryContextMethods method;
- AllocSetData setData;
-} *PortalVariableMemory;
+typedef struct PortalVariableMemory
+{
+ NodeTag type;
+ MemoryContextMethods method;
+ AllocSetData setData;
+} *PortalVariableMemory;
-typedef struct PortalHeapMemory {
- NodeTag type;
- MemoryContextMethods method;
- Pointer block;
- FixedStackData stackData;
-} *PortalHeapMemory;
+typedef struct PortalHeapMemory
+{
+ NodeTag type;
+ MemoryContextMethods method;
+ Pointer block;
+ FixedStackData stackData;
+} *PortalHeapMemory;
/*
* MemoryContextIsValid --
- * True iff memory context is valid.
+ * True iff memory context is valid.
*/
#define MemoryContextIsValid(context) \
- (IsA(context,MemoryContext) || IsA(context,GlobalMemory) || \
- IsA(context,PortalVariableMemory) || IsA(context,PortalHeapMemory))
-
-#endif /* MEMNODES_H */
-
+ (IsA(context,MemoryContext) || IsA(context,GlobalMemory) || \
+ IsA(context,PortalVariableMemory) || IsA(context,PortalHeapMemory))
+#endif /* MEMNODES_H */