From 1de12891f900d156ed035a097561ecd7755a256a Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 2 Nov 2006 17:18:36 +0000 Subject: [PATCH 1/1] 0.9.18.29: --dynamic-space-size command-line switch * Based on the patch by David Lichteblau. Default size of the dynamic space is the same as it used to be, but can be altered at startup. * Delete dead variables: stop_the_world and *INITIAL-DYNAMIC-SPACE-FREE-POINTER*. * Rewrote --help output to more typical usage format. --- NEWS | 2 ++ doc/manual/start-stop.texinfo | 6 +++- doc/sbcl.1 | 4 +++ package-data-list.lisp-expr | 2 +- src/code/early-impl.lisp | 1 - src/compiler/generic/genesis.lisp | 4 --- src/compiler/generic/parms.lisp | 1 - src/runtime/alpha-arch.c | 2 +- src/runtime/bsd-os.c | 2 +- src/runtime/cheneygc.c | 6 ++-- src/runtime/coreparse.c | 11 +++++-- src/runtime/gc.h | 9 ++++++ src/runtime/gencgc-internal.h | 10 ++----- src/runtime/gencgc.c | 42 ++++++++++++++++---------- src/runtime/globals.h | 2 +- src/runtime/interrupt.c | 2 +- src/runtime/purify.c | 2 +- src/runtime/runtime.c | 59 ++++++++++++++++++++++--------------- src/runtime/sparc-arch.c | 2 +- src/runtime/sunos-os.c | 6 ++-- src/runtime/validate.c | 6 ++-- src/runtime/validate.h | 4 +-- src/runtime/win32-os.c | 2 +- version.lisp-expr | 2 +- 24 files changed, 115 insertions(+), 74 deletions(-) diff --git a/NEWS b/NEWS index 1fb6c91..5b50cf3 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ ;;;; -*- coding: utf-8; -*- changes in sbcl-0.9.19 (1.0.0?) relative to sbcl-0.9.18: + * improvement: runtime option --dynamic-space-size can be used + to set the size of the dynamic space reserved on startup. * improvement: floating point modes in effect are now saved in core, and restored on startup. * improvement: GET-INTERNAL-REAL-TIME now reports the time since diff --git a/doc/manual/start-stop.texinfo b/doc/manual/start-stop.texinfo index 1e4811f..e6216a0 100644 --- a/doc/manual/start-stop.texinfo +++ b/doc/manual/start-stop.texinfo @@ -179,7 +179,11 @@ the Lisp core file is a user-created core file, it may run a nonstandard toplevel which does not recognize the standard toplevel options. -@item --noinform +@item --dynamic-space-size @var{megabytes} +Size of the dynamic space reserved on startup in megabytes. Default +value is platform dependent. + +@Item --noinform Suppress the printing of any banner or other informational message at startup. This makes it easier to write Lisp programs which work cleanly in Unix pipelines. See also the @code{--noprint} and diff --git a/doc/sbcl.1 b/doc/sbcl.1 index 32eae83..8e54536 100644 --- a/doc/sbcl.1 +++ b/doc/sbcl.1 @@ -265,6 +265,10 @@ custom core.) Note that if the Lisp core file is a user-created core file, it may run a nonstandard toplevel which does not recognize the standard toplevel options. .TP 3 +.B \-\-dynamic-space-size +Size of the dynamic space reserved on startup in megabytes. Default value +is platform dependent. +.TP 3 .B \-\-noinform Suppress the printing of any banner or other informational message at startup. (This makes it easier to write Lisp programs which work diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index f611f8b..3b75870 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -2194,7 +2194,7 @@ structure representations" #!+ppc "PSEUDO-ATOMIC-FLAG" "GENESIS" "HALT-TRAP" "IGNORE-ME-SC-NUMBER" "IMMEDIATE-CHARACTER-SC-NUMBER" "IMMEDIATE-SAP-SC-NUMBER" - "IMMEDIATE-SC-NUMBER" "*INITIAL-DYNAMIC-SPACE-FREE-POINTER*" + "IMMEDIATE-SC-NUMBER" "INSTANCE-HEADER-WIDETAG" "INSTANCE-POINTER-LOWTAG" "INSTANCE-SLOTS-OFFSET" "INSTANCE-USAGE" "INTERIOR-REG-SC-NUMBER" "INTERNAL-ERROR-ARGS" diff --git a/src/code/early-impl.lisp b/src/code/early-impl.lisp index 071a1b6..cc3a164 100644 --- a/src/code/early-impl.lisp +++ b/src/code/early-impl.lisp @@ -19,7 +19,6 @@ *core-string* *read-only-space-free-pointer* sb!vm:*static-space-free-pointer* - sb!vm:*initial-dynamic-space-free-pointer* sb!vm::*current-catch-block* sb!vm::*current-unwind-protect-block* sb!vm::*alien-stack* diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp index 1e3ed36..aa879d2 100644 --- a/src/compiler/generic/genesis.lisp +++ b/src/compiler/generic/genesis.lisp @@ -3240,10 +3240,6 @@ initially undefined function references:~2%") (allocate-cold-descriptor *static* 0 sb!vm:even-fixnum-lowtag)) - (cold-set 'sb!vm:*initial-dynamic-space-free-pointer* - (allocate-cold-descriptor *dynamic* - 0 - sb!vm:even-fixnum-lowtag)) (/show "done setting free pointers") ;; Write results to files. diff --git a/src/compiler/generic/parms.lisp b/src/compiler/generic/parms.lisp index c41f8a3..d242ce4 100644 --- a/src/compiler/generic/parms.lisp +++ b/src/compiler/generic/parms.lisp @@ -38,7 +38,6 @@ ;; bignums. -- WHN 2000-10-02 *read-only-space-free-pointer* *static-space-free-pointer* - *initial-dynamic-space-free-pointer* ;; things needed for non-local-exit *current-catch-block* diff --git a/src/runtime/alpha-arch.c b/src/runtime/alpha-arch.c index 8fab937..96f7f2c 100644 --- a/src/runtime/alpha-arch.c +++ b/src/runtime/alpha-arch.c @@ -75,7 +75,7 @@ arch_get_bad_addr (int sig, siginfo_t *code, os_context_t *context) if ( (pc < READ_ONLY_SPACE_START || pc >= READ_ONLY_SPACE_START+READ_ONLY_SPACE_SIZE) && (pc < current_dynamic_space || - pc >= current_dynamic_space + DYNAMIC_SPACE_SIZE)) + pc >= current_dynamic_space + dynamic_space_size)) return NULL; return context->uc_mcontext.sc_traparg_a0; diff --git a/src/runtime/bsd-os.c b/src/runtime/bsd-os.c index d4f8574..0fda392 100644 --- a/src/runtime/bsd-os.c +++ b/src/runtime/bsd-os.c @@ -169,7 +169,7 @@ is_valid_lisp_addr(os_vm_address_t addr) struct thread *th; if(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_SPACE_START , DYNAMIC_SPACE_SIZE)) + in_range_p(addr, DYNAMIC_SPACE_START , dynamic_space_size)) return 1; for_each_thread(th) { if((th->control_stack_start <= addr) && (addr < th->control_stack_end)) diff --git a/src/runtime/cheneygc.c b/src/runtime/cheneygc.c index 4e5c135..0f7d38b 100644 --- a/src/runtime/cheneygc.c +++ b/src/runtime/cheneygc.c @@ -241,7 +241,7 @@ collect_garbage(generation_index_t ignore) * RSS by zeroing the from_space or madvise(MADV_DONTNEED) or * similar os-dependent tricks here */ os_zero((os_vm_address_t) from_space, - (os_vm_size_t) DYNAMIC_SPACE_SIZE); + (os_vm_size_t) dynamic_space_size); current_dynamic_space = new_space; dynamic_space_free_pointer = new_space_free_pointer; @@ -589,7 +589,7 @@ void set_auto_gc_trigger(os_vm_size_t dynamic_usage) (unsigned long)((os_vm_address_t)dynamic_space_free_pointer - (os_vm_address_t)current_dynamic_space)); - length = os_trunc_size_to_page(DYNAMIC_SPACE_SIZE - dynamic_usage); + length = os_trunc_size_to_page(dynamic_space_size - dynamic_usage); if (length < 0) lose("set_auto_gc_trigger: tried to set gc trigger too high! (0x%08lx)\n", (unsigned long)dynamic_usage); @@ -612,7 +612,7 @@ void clear_auto_gc_trigger(void) return; addr = (os_vm_address_t)current_auto_gc_trigger; - length = DYNAMIC_SPACE_SIZE + (os_vm_address_t)current_dynamic_space - addr; + length = dynamic_space_size + (os_vm_address_t)current_dynamic_space - addr; #if defined(SUNOS) || defined(SOLARIS) /* don't want to force whole space into swapping mode... */ diff --git a/src/runtime/coreparse.c b/src/runtime/coreparse.c index 0ed38c5..00598c5 100644 --- a/src/runtime/coreparse.c +++ b/src/runtime/coreparse.c @@ -140,6 +140,13 @@ process_directory(int fd, u32 *ptr, int count, os_vm_offset_t file_offset) switch (id) { case DYNAMIC_CORE_SPACE_ID: + if (len > dynamic_space_size) { + fprintf(stderr, + "dynamic space too small for core: %ldKiB required, %ldKiB available.\n", + len >> 10, + (long)dynamic_space_size >> 10); + exit(1); + } #ifdef LISP_FEATURE_GENCGC if (addr != (os_vm_address_t)DYNAMIC_SPACE_START) { fprintf(stderr, "in core: 0x%lx; in runtime: 0x%lx \n", @@ -154,8 +161,8 @@ process_directory(int fd, u32 *ptr, int count, os_vm_offset_t file_offset) (long)DYNAMIC_0_SPACE_START, (long)DYNAMIC_1_SPACE_START); lose("warning: core/runtime address mismatch: DYNAMIC_SPACE_START\n"); - } -#endif + } +#endif #if defined(ALLOCATION_POINTER) SetSymbolValue(ALLOCATION_POINTER, (lispobj)free_pointer,0); #else diff --git a/src/runtime/gc.h b/src/runtime/gc.h index 3d43c0b..76a10e1 100644 --- a/src/runtime/gc.h +++ b/src/runtime/gc.h @@ -15,6 +15,15 @@ #ifndef _GC_H_ #define _GC_H_ + +#include "sbcl.h" + +#ifdef LISP_FEATURE_GENCGC +#define PAGE_BYTES GENCGC_PAGE_SIZE +#else +#define PAGE_BYTES 0x1000 +#endif + typedef signed long page_index_t; typedef signed char generation_index_t; diff --git a/src/runtime/gencgc-internal.h b/src/runtime/gencgc-internal.h index b8beae0..c9fe3b5 100644 --- a/src/runtime/gencgc-internal.h +++ b/src/runtime/gencgc-internal.h @@ -24,8 +24,6 @@ #include "gencgc-alloc-region.h" #include "genesis/code.h" -#define PAGE_BYTES GENCGC_PAGE_SIZE - void gc_free_heap(void); inline page_index_t find_page_index(void *); inline void *page_address(page_index_t); @@ -90,10 +88,8 @@ struct page { /* values for the page.allocated field */ -/* the number of pages needed for the dynamic space - rounding up */ -#define NUM_PAGES ((page_index_t) ((DYNAMIC_SPACE_SIZE+PAGE_BYTES-1)/PAGE_BYTES)) - -extern struct page page_table[NUM_PAGES]; +extern unsigned page_table_pages; +extern struct page *page_table; /* forward declarations */ @@ -116,7 +112,7 @@ space_matches_p(lispobj obj, generation_index_t space) page_index_t page_index=(void*)obj - (void *)DYNAMIC_SPACE_START; return ((page_index >= 0) && ((page_index = - ((unsigned long)page_index)/PAGE_BYTES) < NUM_PAGES) + ((unsigned long)page_index)/PAGE_BYTES) < page_table_pages) && (page_table[page_index].gen == space)); } diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index 6902759..75ee8bb 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -24,6 +24,7 @@ * . */ +#include #include #include #include @@ -147,6 +148,8 @@ unsigned long bytes_allocated = 0; extern unsigned long bytes_consed_between_gcs; /* gc-common.c */ unsigned long auto_gc_trigger = 0; +size_t dynamic_space_size = DEFAULT_DYNAMIC_SPACE_SIZE; + /* the source and destination generations. These are set before a GC starts * scavenging. */ generation_index_t from_space; @@ -159,10 +162,11 @@ boolean gc_active_p = 0; * saving a core), don't scan the stack / mark pages dont_move. */ static boolean conservative_stack = 1; -/* An array of page structures is statically allocated. +/* An array of page structures is allocated on gc initialization. * This helps quickly map between an address its page structure. - * NUM_PAGES is set from the size of the dynamic space. */ -struct page page_table[NUM_PAGES]; + * page_table_pages is set from the size of the dynamic space. */ +unsigned page_table_pages; +struct page *page_table; /* To map addresses to page structures the address of the first page * is needed. */ @@ -184,7 +188,7 @@ find_page_index(void *addr) if (index >= 0) { index = ((unsigned long)index)/PAGE_BYTES; - if (index < NUM_PAGES) + if (index < page_table_pages) return (index); } @@ -1115,11 +1119,11 @@ gc_find_freeish_pages(page_index_t *restart_page_ptr, long nbytes, int unboxed) do { first_page = restart_page; if (large_p) - while ((first_page < NUM_PAGES) + while ((first_page < page_table_pages) && (page_table[first_page].allocated != FREE_PAGE_FLAG)) first_page++; else - while (first_page < NUM_PAGES) { + while (first_page < page_table_pages) { if(page_table[first_page].allocated == FREE_PAGE_FLAG) break; if((page_table[first_page].allocated == @@ -1134,7 +1138,7 @@ gc_find_freeish_pages(page_index_t *restart_page_ptr, long nbytes, int unboxed) first_page++; } - if (first_page >= NUM_PAGES) + if (first_page >= page_table_pages) gc_heap_exhausted_error_or_lose(0, nbytes); gc_assert(page_table[first_page].write_protected == 0); @@ -1144,7 +1148,7 @@ gc_find_freeish_pages(page_index_t *restart_page_ptr, long nbytes, int unboxed) num_pages = 1; while (((bytes_found < nbytes) || (!large_p && (num_pages < 2))) - && (last_page < (NUM_PAGES-1)) + && (last_page < (page_table_pages-1)) && (page_table[last_page+1].allocated == FREE_PAGE_FLAG)) { last_page++; num_pages++; @@ -1157,10 +1161,10 @@ gc_find_freeish_pages(page_index_t *restart_page_ptr, long nbytes, int unboxed) gc_assert(bytes_found == region_size); restart_page = last_page + 1; - } while ((restart_page < NUM_PAGES) && (bytes_found < nbytes)); + } while ((restart_page < page_table_pages) && (bytes_found < nbytes)); /* Check for a failure */ - if ((restart_page >= NUM_PAGES) && (bytes_found < nbytes)) + if ((restart_page >= page_table_pages) && (bytes_found < nbytes)) gc_heap_exhausted_error_or_lose(bytes_found, nbytes); *restart_page_ptr=first_page; @@ -2809,7 +2813,7 @@ scavenge_generations(generation_index_t from, generation_index_t to) #define SC_GEN_CK 0 #if SC_GEN_CK /* Clear the write_protected_cleared flags on all pages. */ - for (i = 0; i < NUM_PAGES; i++) + for (i = 0; i < page_table_pages; i++) page_table[i].write_protected_cleared = 0; #endif @@ -2863,7 +2867,7 @@ scavenge_generations(generation_index_t from, generation_index_t to) #if SC_GEN_CK /* Check that none of the write_protected pages in this generation * have been written to. */ - for (i = 0; i < NUM_PAGES; i++) { + for (i = 0; i < page_table_pages; i++) { if ((page_table[i].allocation != FREE_PAGE_FLAG) && (page_table[i].bytes_used != 0) && (page_table[i].gen == generation) @@ -3095,7 +3099,7 @@ scavenge_newspace_generation(generation_index_t generation) #if SC_NS_GEN_CK /* Check that none of the write_protected pages in this generation * have been written to. */ - for (i = 0; i < NUM_PAGES; i++) { + for (i = 0; i < page_table_pages; i++) { if ((page_table[i].allocation != FREE_PAGE_FLAG) && (page_table[i].bytes_used != 0) && (page_table[i].gen == generation) @@ -4317,7 +4321,7 @@ gc_free_heap(void) if (gencgc_verbose > 1) SHOW("entering gc_free_heap"); - for (page = 0; page < NUM_PAGES; page++) { + for (page = 0; page < page_table_pages; page++) { /* Skip free pages which should already be zero filled. */ if (page_table[page].allocated != FREE_PAGE_FLAG) { void *page_start, *addr; @@ -4403,6 +4407,14 @@ gc_init(void) { page_index_t i; + /* Compute the number of pages needed for the dynamic space. + * Dynamic space size should be aligned on page size. */ + page_table_pages = dynamic_space_size/PAGE_BYTES; + gc_assert(dynamic_space_size == page_table_pages*PAGE_BYTES); + + page_table = calloc(page_table_pages, sizeof(struct page)); + gc_assert(page_table); + gc_init_tables(); scavtab[WEAK_POINTER_WIDETAG] = scav_weak_pointer; transother[SIMPLE_ARRAY_WIDETAG] = trans_boxed_large; @@ -4416,7 +4428,7 @@ gc_init(void) heap_base = (void*)DYNAMIC_SPACE_START; /* Initialize each page structure. */ - for (i = 0; i < NUM_PAGES; i++) { + for (i = 0; i < page_table_pages; i++) { /* Initialize all pages as free. */ page_table[i].allocated = FREE_PAGE_FLAG; page_table[i].bytes_used = 0; diff --git a/src/runtime/globals.h b/src/runtime/globals.h index 60480a7..4d83b31 100644 --- a/src/runtime/globals.h +++ b/src/runtime/globals.h @@ -22,7 +22,7 @@ #ifndef LANGUAGE_ASSEMBLY extern int foreign_function_call_active; -extern boolean stop_the_world; +extern size_t dynamic_space_size; #ifdef LISP_FEATURE_WIN32 #define ENVIRON _environ diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index db665fd..48bec24 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -822,7 +822,7 @@ gc_trigger_hit(int signal, siginfo_t *info, os_context_t *context) else{ void *badaddr=arch_get_bad_addr(signal,info,context); return (badaddr >= (void *)current_auto_gc_trigger && - badaddr <((void *)current_dynamic_space + DYNAMIC_SPACE_SIZE)); + badaddr <((void *)current_dynamic_space + dynamic_space_size)); } } #endif diff --git a/src/runtime/purify.c b/src/runtime/purify.c index 56ec207..944a5e7 100644 --- a/src/runtime/purify.c +++ b/src/runtime/purify.c @@ -1588,7 +1588,7 @@ purify(lispobj static_roots, lispobj read_only_roots) #endif os_zero((os_vm_address_t) current_dynamic_space, - (os_vm_size_t) DYNAMIC_SPACE_SIZE); + (os_vm_size_t) dynamic_space_size); /* Zero the stack. Note that the stack is also zeroed by SUB-GC * calling SCRUB-CONTROL-STACK - this zeros the stack on the x86. */ diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 2e28ffe..f72cd60 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -141,24 +141,26 @@ void print_help() { puts( -"SBCL is a Common Lisp programming environment. Ordinarily you shouldn't\n\ -need command line options when you invoke it interactively: you can just\n\ -start it and work with the customary Lisp READ-EVAL-PRINT loop.\n\ +"Usage: sbcl [runtime-options] [toplevel-options] [user-options]\n\ +Common runtime options:\n\ + --help Print this message and exit.\n\ + --version Print version information and exit.\n\ + --core Use the specified core file instead of the default.\n\ + --dynamic-space-size Size of reserved dynamic space in megabytes.\n\ \n\ -One option idiom which is sometimes useful interactively (e.g. when\n\ -exercising a test case for a bug report) is\n\ - sbcl --no-sysinit --no-userinit\n\ -to keep SBCL from reading any initialization files at startup. And some\n\ -people like to suppress the default startup message:\n\ - sbcl --noinform\n\ +Common toplevel options:\n\ + --sysinit System-wide init-file to use instead of default.\n\ + --userinit Per-user init-file to use instead of default.\n\ + --no-sysinit Inhibit processing of any system-wide init-file.\n\ + --no-userinit Inhibit processing of any per-user init-file.\n\ \n\ -Other options can be useful when you're running SBCL noninteractively,\n\ -e.g. from a script, or if you have a strange system configuration, so\n\ -that SBCL can't by default find one of the files it needs. For\n\ -information on such options, see the sbcl(1) man page.\n\ +User options are not processed by SBCL. All runtime options must\n\ +appear before toplevel options, and all toplevel options must\n\ +appear before user options.\n\ \n\ -More information on SBCL can be found on its man page, or at\n\ -.\n"); +For more information please refer to the SBCL User Manual, which\n\ +should be installed along with SBCL, and is also available from the\n\ +website .\n"); } void @@ -235,14 +237,6 @@ main(int argc, char *argv[], char *envp[]) setlocale(LC_ALL, ""); - /* KLUDGE: os_vm_page_size is set by os_init(), and on some - * systems (e.g. Alpha) arch_init() needs need os_vm_page_size, so - * it must follow os_init(). -- WHN 2000-01-26 */ - os_init(argv, envp); - arch_init(); - gc_init(); - validate(); - /* Parse our part of the command line (aka "runtime options"), * stripping out those options that we handle. */ { @@ -273,6 +267,14 @@ main(int argc, char *argv[], char *envp[]) /* As in "--help" case, I think this is expected. */ print_version(); exit(0); + } else if (0 == strcmp(arg, "--dynamic-space-size")) { + ++argi; + if (argi >= argc) + lose("missing argument for --dynamic-space-size"); + errno = 0; + dynamic_space_size = strtol(argv[argi++], 0, 0) << 20; + if (errno) + lose("argument to --dynamic-space-size is not a number"); } else if (0 == strcmp(arg, "--debug-environment")) { int n = 0; printf("; Commandline arguments:\n"); @@ -326,6 +328,17 @@ main(int argc, char *argv[], char *envp[]) } } + /* Align down to multiple of page_table page size */ + dynamic_space_size = (dynamic_space_size/PAGE_BYTES) * PAGE_BYTES; + + /* KLUDGE: os_vm_page_size is set by os_init(), and on some + * systems (e.g. Alpha) arch_init() needs need os_vm_page_size, so + * it must follow os_init(). -- WHN 2000-01-26 */ + os_init(argv, envp); + arch_init(); + gc_init(); + validate(); + /* If no core file was specified, look for one. */ if (!core) { char *runtime_path = os_get_runtime_executable_path(); diff --git a/src/runtime/sparc-arch.c b/src/runtime/sparc-arch.c index a365bb0..38f60e5 100644 --- a/src/runtime/sparc-arch.c +++ b/src/runtime/sparc-arch.c @@ -52,7 +52,7 @@ os_vm_address_t arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *contex if ((pc < READ_ONLY_SPACE_START || pc >= READ_ONLY_SPACE_START+READ_ONLY_SPACE_SIZE) && (pc < current_dynamic_space || - pc >= current_dynamic_space + DYNAMIC_SPACE_SIZE)) { + pc >= current_dynamic_space + dynamic_space_size)) { return NULL; } diff --git a/src/runtime/sunos-os.c b/src/runtime/sunos-os.c index e88e950..9278a72 100644 --- a/src/runtime/sunos-os.c +++ b/src/runtime/sunos-os.c @@ -177,10 +177,10 @@ boolean is_valid_lisp_addr(os_vm_address_t addr) if(in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE) || in_range_p(addr, STATIC_SPACE_START , STATIC_SPACE_SIZE) || #ifdef LISP_FEATURE_GENCGC - in_range_p(addr, DYNAMIC_SPACE_START, DYNAMIC_SPACE_SIZE) + in_range_p(addr, DYNAMIC_SPACE_START , dynamic_space_size) #else - 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_0_SPACE_START, dynamic_space_size) || + in_range_p(addr, DYNAMIC_1_SPACE_START, dynamic_space_size) #endif ) return 1; diff --git a/src/runtime/validate.c b/src/runtime/validate.c index 9f72e7f..0061344 100644 --- a/src/runtime/validate.c +++ b/src/runtime/validate.c @@ -61,10 +61,10 @@ validate(void) ensure_space( (lispobj *)READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE); ensure_space( (lispobj *)STATIC_SPACE_START , STATIC_SPACE_SIZE); #ifdef LISP_FEATURE_GENCGC - ensure_space( (lispobj *)DYNAMIC_SPACE_START , DYNAMIC_SPACE_SIZE); + ensure_space( (lispobj *)DYNAMIC_SPACE_START , dynamic_space_size); #else - ensure_space( (lispobj *)DYNAMIC_0_SPACE_START , DYNAMIC_SPACE_SIZE); - ensure_space( (lispobj *)DYNAMIC_1_SPACE_START , DYNAMIC_SPACE_SIZE); + ensure_space( (lispobj *)DYNAMIC_0_SPACE_START, dynamic_space_size); + ensure_space( (lispobj *)DYNAMIC_1_SPACE_START, dynamic_space_size); #endif #ifdef LISP_FEATURE_LINKAGE_TABLE diff --git a/src/runtime/validate.h b/src/runtime/validate.h index 05f58e8..6674313 100644 --- a/src/runtime/validate.h +++ b/src/runtime/validate.h @@ -23,9 +23,9 @@ /* constants derived from the fundamental constants in passed by GENESIS */ #ifdef LISP_FEATURE_GENCGC -#define DYNAMIC_SPACE_SIZE (DYNAMIC_SPACE_END - DYNAMIC_SPACE_START) +#define DEFAULT_DYNAMIC_SPACE_SIZE (DYNAMIC_SPACE_END - DYNAMIC_SPACE_START) #else -#define DYNAMIC_SPACE_SIZE (DYNAMIC_0_SPACE_END - DYNAMIC_0_SPACE_START) +#define DEFAULT_DYNAMIC_SPACE_SIZE (DYNAMIC_0_SPACE_END - DYNAMIC_0_SPACE_START) #endif #define READ_ONLY_SPACE_SIZE (READ_ONLY_SPACE_END - READ_ONLY_SPACE_START) #define STATIC_SPACE_SIZE (STATIC_SPACE_END - STATIC_SPACE_START) diff --git a/src/runtime/win32-os.c b/src/runtime/win32-os.c index 0e6bc1c..baac264 100644 --- a/src/runtime/win32-os.c +++ b/src/runtime/win32-os.c @@ -282,7 +282,7 @@ is_valid_lisp_addr(os_vm_address_t addr) struct thread *th; if(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_SPACE_START , DYNAMIC_SPACE_SIZE)) + in_range_p(addr, DYNAMIC_SPACE_START , dynamic_space_size)) return 1; for_each_thread(th) { if(((os_vm_address_t)th->control_stack_start <= addr) && (addr < (os_vm_address_t)th->control_stack_end)) diff --git a/version.lisp-expr b/version.lisp-expr index feb4bf7..c197da6 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.18.28" +"0.9.18.29" -- 1.7.10.4