Raymond Toy pushed to branch rtoy-mmap-anon-control-and-binding-stacks at cmucl / cmucl
Commits:
-
5a413e60
by Raymond Toy
at 2015-10-11T16:00:39Z
Support stacks at fixed addresses as before.
If CONTROL_STACK_START or BINDING_STACK_START are defined, we take
that as a hint that the system wants the stacks mapped at fixed
addresses. Otherwise, the stacks are mapped wherever there's room.
1 changed file:
Changes:
src/lisp/validate.c
--- a/src/lisp/validate.c
+++ b/src/lisp/validate.c
@@ -115,16 +115,29 @@ void
validate_stacks()
{
/* Control Stack */
+#ifdef CONTROL_STACK_START
+ /* Map the control stack at a fixed location */
+ control_stack = (lispobj *) CONTROL_STACK_START;
+#if (defined(i386) || defined(__x86_64))
+ control_stack_end = (lispobj *) (CONTROL_STACK_START + control_stack_size);
+#endif
+ ensure_space(control_stack, control_stack_size);
+#else
/* Map the conrol stack wherever we have space */
control_stack = (lispobj*) os_validate(NULL, control_stack_size);
#if (defined(i386) || defined(__x86_64))
control_stack_end = (void*)control_stack + control_stack_size;
#endif
+#endif
/* Binding Stack */
+#ifdef BINDING_STACK_START
+ binding_stack = (lispobj *) BINDING_STACK_START;
+ ensure_space(binding_stack, binding_stack_size);
+#else
binding_stack = (lispobj*) os_validate(NULL, binding_stack_size);
-
+#endif
#ifdef sparc
make_stack_holes();
#endif