(or (< sb!vm:read-only-space-start val
(* sb!vm:*read-only-space-free-pointer*
sb!vm:word-bytes))
- (< sb!vm::static-space-start val
+ (< sb!vm:static-space-start val
(* sb!vm:*static-space-free-pointer*
sb!vm:word-bytes))
- (< (sb!vm:current-dynamic-space-start) val
+ (< (sb!vm:dynamic-space-start) val
(sap-int (dynamic-space-free-pointer))))))
(make-lisp-obj val)
:invalid-object))
(def-c-var-frob sb!vm:control-stack-start "control_stack")
#!+x86 (def-c-var-frob control-stack-end "control_stack_end")
(def-c-var-frob sb!vm:binding-stack-start "binding_stack")
-(def-c-var-frob sb!vm:current-dynamic-space-start "current_dynamic_space")
#!-sb-fluid (declaim (inline dynamic-usage))
(def-c-var-frob dynamic-usage "bytes_allocated")
(values (int-sap read-only-space-start)
(int-sap (* *read-only-space-free-pointer* word-bytes))))
(:dynamic
- (values (int-sap (current-dynamic-space-start))
+ (values (int-sap dynamic-space-start)
(dynamic-space-free-pointer)))))
;;; Return the total number of bytes used in SPACE.
#define SET_GC_TRIGGER(new_value) \
(SetSymbolValue(INTERNAL_GC_TRIGGER,(lispobj)(new_value)))
#else
-#define GET_FREE_POINTER() current_dynamic_space_free_pointer
-#define SET_FREE_POINTER(new_value) \
- (current_dynamic_space_free_pointer = (new_value))
+#define GET_FREE_POINTER() dynamic_space_free_pointer
+#define SET_FREE_POINTER(new_value) (dynamic_space_free_pointer = (new_value))
#define GET_GC_TRIGGER() current_auto_gc_trigger
#define SET_GC_TRIGGER(new_value) \
clear_auto_gc_trigger(); set_auto_gc_trigger(new_value);
if (GET_GC_TRIGGER() && GET_FREE_POINTER() > GET_GC_TRIGGER()) {
SET_GC_TRIGGER((char *)GET_FREE_POINTER()
- - (char *)current_dynamic_space);
+ - (char *)DYNAMIC_SPACE_START);
}
return result;
{
return in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE)
|| in_range_p(addr, STATIC_SPACE_START , STATIC_SPACE_SIZE )
- || in_range_p(addr, DYNAMIC_0_SPACE_START, DYNAMIC_SPACE_SIZE )
- || in_range_p(addr, DYNAMIC_1_SPACE_START, DYNAMIC_SPACE_SIZE )
+ || in_range_p(addr, DYNAMIC_SPACE_START , DYNAMIC_SPACE_SIZE )
|| in_range_p(addr, CONTROL_STACK_START , CONTROL_STACK_SIZE )
|| in_range_p(addr, BINDING_STACK_START , BINDING_STACK_SIZE );
}
switch (id) {
case DYNAMIC_SPACE_ID:
- if (addr != (os_vm_address_t)dynamic_0_space
- && addr != (os_vm_address_t)dynamic_1_space) {
- lose("bizarre dynamic space!");
+ if (addr != (os_vm_address_t)DYNAMIC_SPACE_START) {
+ lose("incorrect dynamic space");
}
- current_dynamic_space = (lispobj *)addr;
#if defined(ibmrt) || defined(__i386__)
SetSymbolValue(ALLOCATION_POINTER, (lispobj)free_pointer);
#else
- current_dynamic_space_free_pointer = free_pointer;
+ dynamic_space_free_pointer = free_pointer;
#endif
break;
case STATIC_SPACE_ID:
gc_init_tables();
- heap_base = (void*)DYNAMIC_0_SPACE_START;
+ heap_base = (void*)DYNAMIC_SPACE_START;
/* Initialize each page structure. */
for (i = 0; i < NUM_PAGES; i++) {
gencgc_pickup_dynamic(void)
{
int page = 0;
- int addr = DYNAMIC_0_SPACE_START;
+ int addr = DYNAMIC_SPACE_START;
int alloc_ptr = SymbolValue(ALLOCATION_POINTER);
/* Initialize the first region. */
page_table[page].bytes_used = 4096;
page_table[page].large_object = 0;
page_table[page].first_object_offset =
- (void *)DYNAMIC_0_SPACE_START - page_address(page);
+ (void *)DYNAMIC_SPACE_START - page_address(page);
addr += 4096;
page++;
} while (addr < alloc_ptr);
lispobj *read_only_space;
lispobj *static_space;
-lispobj *dynamic_0_space;
-lispobj *dynamic_1_space;
lispobj *control_stack;
#ifdef __i386__
lispobj *control_stack_end;
#endif
lispobj *binding_stack;
-lispobj *current_dynamic_space;
#ifndef ALLOCATION_POINTER
-lispobj *current_dynamic_space_free_pointer;
+lispobj *dynamic_space_free_pointer;
#endif
#ifndef INTERNAL_GC_TRIGGER
lispobj *current_auto_gc_trigger;
extern lispobj *read_only_space;
extern lispobj *static_space;
-extern lispobj *dynamic_0_space;
-extern lispobj *dynamic_1_space;
extern lispobj *control_stack;
extern lispobj *binding_stack;
#ifdef __i386__
extern lispobj *control_stack_end;
#endif
-extern lispobj *current_dynamic_space;
#if !defined(ibmrt) && !defined(__i386__)
-extern lispobj *current_dynamic_space_free_pointer;
+extern lispobj *dynamic_space_free_pointer;
extern lispobj *current_auto_gc_trigger;
#endif
EXTERN(current_control_frame_pointer, 4)
#if !defined(ibmrt) && !defined(__i386__)
EXTERN(current_binding_stack_pointer, 4)
-EXTERN(current_dynamic_space_free_pointer, 4)
+EXTERN(dynamic_space_free_pointer, 4)
#endif
#ifdef mips
/* Get current Lisp state from context. */
#ifdef reg_ALLOC
- current_dynamic_space_free_pointer =
+ dynamic_space_free_pointer =
(lispobj *)(*os_context_register_addr(context, reg_ALLOC));
#ifdef alpha
- if ((long)current_dynamic_space_free_pointer & 1) {
+ if ((long)dynamic_space_free_pointer & 1) {
lose("dead in fake_foreign_function_call, context = %x", context);
}
#endif
#ifdef reg_ALLOC
/* Put the dynamic space free pointer back into the context. */
*os_context_register_addr(context, reg_ALLOC) =
- (unsigned long) current_dynamic_space_free_pointer;
+ (unsigned long) dynamic_space_free_pointer;
#endif
}
context);
return (badaddr >= current_auto_gc_trigger &&
- badaddr < current_dynamic_space + DYNAMIC_SPACE_SIZE);
+ badaddr < DYNAMIC_SPACE_START + DYNAMIC_SPACE_SIZE);
}
}
#endif
return
in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE) ||
in_range_p(addr, STATIC_SPACE_START , STATIC_SPACE_SIZE) ||
- in_range_p(addr, DYNAMIC_0_SPACE_START, DYNAMIC_SPACE_SIZE) ||
- in_range_p(addr, DYNAMIC_1_SPACE_START, DYNAMIC_SPACE_SIZE) ||
+ in_range_p(addr, DYNAMIC_SPACE_START , DYNAMIC_SPACE_SIZE) ||
in_range_p(addr, CONTROL_STACK_START , CONTROL_STACK_SIZE) ||
in_range_p(addr, BINDING_STACK_START , BINDING_STACK_SIZE);
}
printf("BSP\t=\t0x%08X\n", SymbolValue(BINDING_STACK_POINTER));
#endif
- printf("DYNAMIC\t=\t0x%08lX\n", (unsigned long)current_dynamic_space);
+ printf("DYNAMIC\t=\t0x%08lX\n", (unsigned long)DYNAMIC_SPACE_START);
#if defined(ibmrt) || defined(__i386__)
printf("ALLOC\t=\t0x%08lX\n", SymbolValue(ALLOCATION_POINTER));
printf("TRIGGER\t=\t0x%08lX\n", SymbolValue(INTERNAL_GC_TRIGGER));
#else
printf("ALLOC\t=\t0x%08X\n",
- (unsigned long)current_dynamic_space_free_pointer);
+ (unsigned long)dynamic_space_free_pointer);
printf("TRIGGER\t=\t0x%08X\n", (unsigned long)current_auto_gc_trigger);
#endif
printf("STATIC\t=\t0x%08lX\n", SymbolValue(STATIC_SPACE_FREE_POINTER));
}
/* Search dynamic space. */
- headerptr = current_dynamic_space;
+ headerptr = DYNAMIC_SPACE_START;
#if !defined(ibmrt) && !defined(__i386__)
- count = current_dynamic_space_free_pointer - current_dynamic_space;
+ count = dynamic_space_free_pointer - DYNAMIC_SPACE_START;
#else
- count = (lispobj *)SymbolValue(ALLOCATION_POINTER) - current_dynamic_space;
+ count = (lispobj *)SymbolValue(ALLOCATION_POINTER) - DYNAMIC_SPACE_START;
#endif
if (search_for_symbol(name, &headerptr, &count)) {
*result = (lispobj)headerptr | type_OtherPointer;
#undef PRINTNOISE
#if defined(ibmrt) || defined(__i386__)
-static lispobj *current_dynamic_space_free_pointer;
+static lispobj *dynamic_space_free_pointer;
#endif
#define gc_abort() \
dynamic_pointer_p(lispobj ptr)
{
#ifndef __i386__
- return (ptr >= (lispobj)dynamic_0_space);
+ /* KLUDGE: This has an implicit dependence on the ordering of
+ * address spaces, and is therefore basically wrong. I'd fix it,
+ * but I don't have a non-386 port to test it on. Porters are
+ * encouraged to fix it. -- WHN 2000-10-17 */
+ return (ptr >= (lispobj)DYNAMIC_SPACE_START);
#else
/* Be more conservative, and remember, this is a maybe. */
- return (ptr >= (lispobj)current_dynamic_space
+ return (ptr >= (lispobj)DYNAMIC_SPACE_START
&&
- ptr < (lispobj)current_dynamic_space_free_pointer);
+ ptr < (lispobj)dynamic_space_free_pointer);
#endif
}
}
#if defined(ibmrt) || defined(__i386__)
- current_dynamic_space_free_pointer =
+ dynamic_space_free_pointer =
(lispobj*)SymbolValue(ALLOCATION_POINTER);
#endif
#endif
#if defined(WANT_CGC) && defined(X86_CGC_ACTIVE_P)
- if(SymbolValue(X86_CGC_ACTIVE_P) != T)
- os_zero((os_vm_address_t) current_dynamic_space,
- (os_vm_size_t) DYNAMIC_SPACE_SIZE);
+ if(SymbolValue(X86_CGC_ACTIVE_P) != T) {
+ os_zero((os_vm_address_t) DYNAMIC_SPACE_START,
+ (os_vm_size_t) DYNAMIC_SPACE_SIZE);
+ }
#else
- os_zero((os_vm_address_t) current_dynamic_space,
+ os_zero((os_vm_address_t) DYNAMIC_SPACE_START,
(os_vm_size_t) DYNAMIC_SPACE_SIZE);
#endif
SetSymbolValue(STATIC_SPACE_FREE_POINTER, (lispobj)static_free);
#if !defined(ibmrt) && !defined(__i386__)
- current_dynamic_space_free_pointer = current_dynamic_space;
+ dynamic_space_free_pointer = DYNAMIC_SPACE_START;
#else
#if defined(WANT_CGC) && defined(X86_CGC_ACTIVE_P)
/* X86 using CGC */
if(SymbolValue(X86_CGC_ACTIVE_P) != T)
- SetSymbolValue(ALLOCATION_POINTER, (lispobj)current_dynamic_space);
+ SetSymbolValue(ALLOCATION_POINTER, (lispobj)DYNAMIC_SPACE_START);
else
- cgc_free_heap();
+ cgc_free_heap();
#else
#if defined GENCGC
gc_free_heap();
#else
/* ibmrt using GC */
- SetSymbolValue(ALLOCATION_POINTER, (lispobj)current_dynamic_space);
+ SetSymbolValue(ALLOCATION_POINTER, (lispobj)DYNAMIC_SPACE_START);
#endif
#endif
#endif
* MBs of just cleared heap.
*/
if(SymbolValue(X86_CGC_ACTIVE_P) != NIL)
- SetSymbolValue(ALLOCATION_POINTER,DYNAMIC_0_SPACE_START);
+ SetSymbolValue(ALLOCATION_POINTER, DYNAMIC_SPACE_START);
#endif
/* Open the file: */
unlink(filename);
output_space(file, STATIC_SPACE_ID, static_space,
(lispobj *)SymbolValue(STATIC_SPACE_FREE_POINTER));
#ifdef reg_ALLOC
- output_space(file, DYNAMIC_SPACE_ID, current_dynamic_space,
- current_dynamic_space_free_pointer);
+ output_space(file, DYNAMIC_SPACE_ID, DYNAMIC_SPACE_START,
+ dynamic_space_free_pointer);
#else
#ifdef GENCGC
/* Flush the current_region updating the tables. */
gc_alloc_update_page_tables(1,&unboxed_region);
update_x86_dynamic_space_free_pointer();
#endif
- output_space(file, DYNAMIC_SPACE_ID, current_dynamic_space,
+ output_space(file, DYNAMIC_SPACE_ID, DYNAMIC_SPACE_START,
(lispobj *)SymbolValue(ALLOCATION_POINTER));
#endif
ensure_space(static_space, STATIC_SPACE_SIZE);
/* Dynamic-0 Space */
- dynamic_0_space = (lispobj *) DYNAMIC_0_SPACE_START;
- ensure_space(dynamic_0_space, DYNAMIC_SPACE_SIZE);
-
- current_dynamic_space = dynamic_0_space;
-
- /* Dynamic-1 Space */
- dynamic_1_space = (lispobj *) DYNAMIC_1_SPACE_START;
-#ifndef GENCGC
- ensure_space(dynamic_1_space, DYNAMIC_SPACE_SIZE);
-#endif
+ ensure_space(DYNAMIC_SPACE_START, DYNAMIC_SPACE_SIZE);
/* Control Stack */
control_stack = (lispobj *) CONTROL_STACK_START;
#define CONTROL_STACK_START (0x40000000)
#define CONTROL_STACK_SIZE (0x08000000) /* 128MB */
-#define DYNAMIC_0_SPACE_START (0x48000000)
-#ifdef GENCGC
-#define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
-#else
-#define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
-#endif
+#define DYNAMIC_SPACE_SIZE (0x40000000) /* may be up to 2GB */
#endif
/* FIXME: It's gross to have numbers like 0x50000000 wired into the
#define CONTROL_STACK_START (0x50000000)
#define CONTROL_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
-#define DYNAMIC_0_SPACE_START (0x09000000)
-#ifdef GENCGC
#define DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
-#else
-#define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
-#endif
#endif
#define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
-
-/* Note that GENCGC only uses dynamic_space 0. */
-#define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)
;;; versions, and a string a la "0.6.5.12" is used for versions which
;;; aren't released but correspond only to CVS tags or snapshots.
-"0.6.7.11"
+"0.6.7.13"