promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchmmg.c,v 9.31 1987/06/15 19:25:57 jinx Exp $ */
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchmmg.c,v 9.32 1987/06/23 22:00:37 cph Rel $ */
/* Memory management top level. Garbage collection to disk.
}
\f
void
-Clear_Memory(Our_Heap_Size, Our_Stack_Size, Our_Constant_Size)
+Clear_Memory (Our_Heap_Size, Our_Stack_Size, Our_Constant_Size)
int Our_Heap_Size, Our_Stack_Size, Our_Constant_Size;
{
- Heap_Top = Heap_Bottom + Our_Heap_Size;
- Set_Mem_Top(Heap_Top - GC_Reserve);
+ Heap_Top = (Heap_Bottom + Our_Heap_Size);
+ Set_Mem_Top (Heap_Top - GC_Reserve);
Free = Heap_Bottom;
+ Constant_Top = (Constant_Space + Our_Constant_Size);
Free_Constant = Constant_Space;
- Set_Pure_Top();
- Initialize_Stack();
+ Set_Pure_Top ();
+ Initialize_Stack ();
return;
}
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/default.h,v 9.24 1987/06/18 19:54:28 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/default.h,v 9.25 1987/06/23 22:02:41 cph Exp $
*
* This file contains default definitions for some hooks which
* various machines require. These machines define these hooks
(Swap_Temp = *(P), *(P) = (S), Swap_Temp)
#endif
\f
-#ifndef Set_Pure_Top
#ifndef USE_STACKLETS
-#define Set_Pure_Top() \
- Align_Float(Free_Constant); \
- Set_Stack_Guard(Free_Constant+STACK_GUARD_SIZE)
-#define Test_Pure_Space_Top(New_Top) \
- ((New_Top+STACK_GUARD_SIZE) <= Stack_Pointer)
-#define Absolute_Stack_Base Free_Constant
+
+#define Absolute_Stack_Base Constant_Top
#ifndef Initialize_Stack
#define Initialize_Stack() \
+do \
+{ \
Stack_Top = Highest_Allocated_Address; \
Stack_Pointer = Stack_Top; \
- Set_Stack_Guard(Free_Constant + STACK_GUARD_SIZE)
+ Set_Stack_Guard (Absolute_Stack_Base + STACK_GUARD_SIZE); \
+} while (0)
#endif
-#else /* Stacklets in use */
-
-#define Set_Pure_Top() Align_Float(Free_Constant)
-#define Test_Pure_Space_Top(New_Top) \
- (New_Top <= Highest_Allocated_Address)
-#endif
#endif
-\f
-/* Character IO hooks. Used extensively. */
-#ifndef OS_Put_C
-#define OS_Put_C putc
+#ifndef Set_Pure_Top
+#define Set_Pure_Top() Align_Float (Free_Constant)
#endif
-#ifndef OS_Get_C
-#define OS_Get_C getc
+#ifndef Test_Pure_Space_Top
+#define Test_Pure_Space_Top(New_Top) ((New_Top) <= Constant_Top)
#endif
-
+\f
/* Used in BOOT.C */
#ifndef main_type
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/extern.h,v 9.26 1987/06/05 04:13:51 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/extern.h,v 9.27 1987/06/23 22:01:36 cph Rel $
*
* External declarations.
*
*Free_Stacklets, /* Free list of stacklets */
*Constant_Space, /* Bottom of constant+pure space */
*Free_Constant, /* Next free cell in constant+pure area */
+ *Constant_Top, /* Top of constant+pure space */
*Heap_Top, /* Top of current heap space */
*Heap_Bottom, /* Bottom of current heap space */
*Unused_Heap_Top, /* Top of unused heap for GC */
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/memmag.c,v 9.29 1987/04/21 15:01:18 cph Exp $ */
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/memmag.c,v 9.30 1987/06/23 22:00:09 cph Rel $ */
/* Memory management top level.
special: it always points to a cell which is in use. */
void
-Clear_Memory(Our_Heap_Size, Our_Stack_Size, Our_Constant_Size)
+Clear_Memory (Our_Heap_Size, Our_Stack_Size, Our_Constant_Size)
int Our_Heap_Size, Our_Stack_Size, Our_Constant_Size;
{
- Heap_Top = Heap_Bottom + Our_Heap_Size;
+ Heap_Top = (Heap_Bottom + Our_Heap_Size);
Local_Heap_Base = Heap_Bottom;
- Unused_Heap_Top = Heap_Bottom + 2*Our_Heap_Size;
- Set_Mem_Top(Heap_Top - GC_Reserve);
+ Unused_Heap_Top = (Heap_Bottom + (2 * Our_Heap_Size));
+ Set_Mem_Top (Heap_Top - GC_Reserve);
Free = Heap_Bottom;
+ Constant_Top = (Constant_Space + Our_Constant_Size);
Free_Constant = Constant_Space;
- Set_Pure_Top();
- Initialize_Stack();
+ Set_Pure_Top ();
+ Initialize_Stack ();
return;
}
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/stack.h,v 9.21 1987/04/16 02:29:23 jinx Exp $ */
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/stack.h,v 9.22 1987/06/23 22:01:13 cph Rel $ */
/* This file contains macros for manipulating stacks and stacklets. */
\f
/* Full size stack in a statically allocated area */
#define Stack_Check(P) \
+do \
{ \
if ((P) <= Stack_Guard) \
- { if ((P) <= Absolute_Stack_Base) \
+ { \
+ if ((P) <= Absolute_Stack_Base) \
Microcode_Termination (TERM_STACK_OVERFLOW); \
Request_Interrupt (INT_Stack_Overflow); \
} \
-}
+} while (0)
-#define Internal_Will_Push(N) Stack_Check(Stack_Pointer - (N))
+#define Internal_Will_Push(N) Stack_Check(Stack_Pointer - (N))
-#define Stack_Allocation_Size(Stack_Blocks) (Stack_Blocks)
+#define Stack_Allocation_Size(Stack_Blocks) (Stack_Blocks)
#define Terminate_Old_Stacklet()
promotional, or sales literature without prior written consent from
MIT in each case. */
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.34 1987/06/05 04:15:27 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.35 1987/06/23 22:01:53 cph Rel $
This file defines the storage for global variables for
the Scheme Interpreter. */
*Free_Stacklets, /* Free list of stacklets */
*Constant_Space, /* Bottom of constant+pure space */
*Free_Constant, /* Next free cell in constant+pure area */
+ *Constant_Top, /* Top of constant+pure space */
*Heap_Top, /* Top of current heap */
*Heap_Bottom, /* Bottom of current heap */
*Unused_Heap_Top, /* Top of other heap */