Commit 44a8f0c7 authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix Trac ticket:46.

Make the size of all spaces configurable from the command line.

code/commandline.lisp:
o Define the switches so lisp doesn't complain.

general-info/lisp.1:
o Document new switches.

general-info/release-20c.txt:
o Update

lisp/Darwin-os.c
lisp/FreeBSD-os.c
lisp/Linux-os.c
lisp/NetBSD-os.c
lisp/backtrace.c
lisp/cgc.c
lisp/gencgc.c
lisp/os-common.c
lisp/ppc-validate.h
lisp/purify.c
lisp/solaris-os.c
lisp/sparc-arch.c
lisp/sparc-validate.h
lisp/x86-validate.h:
lisp/validate.c
o Basically rename CONTROL_STACK_SIZE, BINDING_STACK_SIZE,
  READ_ONLY_SPACE_SIZE, and STATIC_SPACE_SIZE to control_stack_size,
  binding_stack_size, read_only_space_size, and static_space_size,
  respectively.

lisp/coreparse.c
o Check the space size in the core file against the allocated size.
  If the allocated space is too small, print an error message and
  exit.

lisp/globals.c
o Define new variables for the allocated size of spaces.

lisp/globals.h
o Declare the new variables for the size of the spaces.

lisp/lisp.c
o Set the default values of the spaces.
o Parse the new command-line flags and set the space sizes.

lisp/sunos-os.c:
o Added os_init0 (that we forgot last time).

lisp/x86-assem.S:
o Change $CONTROL_STACK_END to GNAME(control_stack_end) to get the
  correct end of the stack.
parent 2f083da9
Loading
Loading
Loading
Loading
+29 −1
Original line number Diff line number Diff line
@@ -287,6 +287,34 @@
  actual maximum allowed heap size is platform-specific."
  "megabytes")

(defswitch "read-only-space-size" nil
  "Specifies the number of megabytes that should be allocated for the
  read-only space.  If not specified, a platform-specific default is
  used.  The actual maximum allowed read-only size is
  platform-specific."
  "megabytes")

(defswitch "static-space-size" nil
  "Specifies the number of megabytes that should be allocated for the
  static space.  If not specified, a platform-specific default is
  used.  The actual maximum allowed static space size is
  platform-specific."
  "megabytes")

(defswitch "control-stack-size" nil
  "Specifies the number of megabytes that should be allocated for the
  control stack.  If not specified, a platform-specific default is
  used.  The actual maximum allowed control stack size is
  platform-specific."
  "megabytes")

(defswitch "binding-stack-size" nil
  "Specifies the number of megabytes that should be allocated for the
  binding stack.  If not specified, a platform-specific default is
  used.  The actual maximum allowed binding stack size is
  platform-specific."
  "megabytes")

(defswitch "lib" nil
  "A colon-separated list of directories to be used for the library:
  search-list."
+23 −1
Original line number Diff line number Diff line
@@ -55,8 +55,30 @@ most unnecessary noise, like GC messages, load messages, etc. to be suppressed.
Requires an argument that should be the number of megabytes (1048576 bytes)
that should be allocated to the heap.  If not specified, a platform-specific
default is used.  The actual maximum allowed heap size is platform-specific.
Currently, this option is only available for the x86 and sparc platforms. 
.TP
.TP
.BR \-read-only-space-size
Requires an argument that should be the number of megabytes (1048576 bytes)
that should be allocated to the read-only space.  If not specified, a platform-specific
default is used.
.TP
.TP
.BR \-static-space-size
Requires an argument that should be the number of megabytes (1048576 bytes)
that should be allocated to the static-space.  If not specified, a platform-specific
default is used.  The actual maximum allowed heap size is platform-specific.
.TP
.TP
.BR \-control-stack-size
Requires an argument that should be the number of megabytes (1048576 bytes)
that should be allocated for the control stack.  If not specified, a platform-specific
default is used.  The actual maximum allowed heap size is platform-specific.
.TP
.TP
.BR \-binding-stack-size
Requires an argument that should be the number of megabytes (1048576 bytes)
that should be allocated for the binding stack.  If not specified, a platform-specific
default is used.  The actual maximum allowed heap size is platform-specific.
.BR \-edit
Causes Lisp to enter the 
.I Hemlock
+5 −0
Original line number Diff line number Diff line
@@ -149,6 +149,11 @@ New in this release:
    - #43: unread-char doesn't change file-position
      Fixed.

    - #47: Added command line flags -read-only-space-size,
      -static-space-size, -control-stack-size, and -binding-stack-size
      to control the size of the each region.  The default size for
      each is unchanged.

  * Other changes:

  * Improvements to the PCL implementation of CLOS:
+4 −4
Original line number Diff line number Diff line
@@ -444,14 +444,14 @@ valid_addr(os_vm_address_t addr)

    newaddr = os_trunc_to_page(addr);

    if (in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE)
	|| in_range_p(addr, STATIC_SPACE_START, STATIC_SPACE_SIZE)
    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_0_SPACE_START, dynamic_space_size)
#ifndef GENCGC
	|| in_range_p(addr, DYNAMIC_1_SPACE_START, dynamic_space_size)
#endif
	|| in_range_p(addr, CONTROL_STACK_START, CONTROL_STACK_SIZE)
	|| in_range_p(addr, BINDING_STACK_START, BINDING_STACK_SIZE))
	|| in_range_p(addr, CONTROL_STACK_START, control_stack_size)
	|| in_range_p(addr, BINDING_STACK_START, binding_stack_size))
	return TRUE;
    return FALSE;
}
+4 −4
Original line number Diff line number Diff line
@@ -224,14 +224,14 @@ valid_addr(os_vm_address_t addr)

    newaddr = os_trunc_to_page(addr);

    if (in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE)
	|| in_range_p(addr, STATIC_SPACE_START, STATIC_SPACE_SIZE)
    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_0_SPACE_START, dynamic_space_size)
#ifndef GENCGC
	|| in_range_p(addr, DYNAMIC_1_SPACE_START, dynamic_space_size)
#endif
	|| in_range_p(addr, CONTROL_STACK_START, CONTROL_STACK_SIZE)
	|| in_range_p(addr, BINDING_STACK_START, BINDING_STACK_SIZE))
	|| in_range_p(addr, CONTROL_STACK_START, control_stack_size)
	|| in_range_p(addr, BINDING_STACK_START, binding_stack_size))
	return TRUE;
    return FALSE;
}
Loading