From bcb73a5e954df5b6003b0ac8cb7e0a9cf29995ab Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Sat, 3 Oct 2015 14:26:17 -0700
Subject: [PATCH] Simplify make_hole:  just pass in address and size.

---
 src/lisp/solaris-os.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lisp/solaris-os.c b/src/lisp/solaris-os.c
index f95e2fd59..8e88e435e 100644
--- a/src/lisp/solaris-os.c
+++ b/src/lisp/solaris-os.c
@@ -435,13 +435,13 @@ static unsigned long *space_size[] = {
 #define HOLE_SIZE 0x2000
 
 void
-make_hole(int k)
+make_hole(void *start_start, size_t space_size)
 {
     os_vm_address_t hole;
 
     /* Make holes of the appropriate size for desired spaces */
 
-    hole = spaces[k] + *space_size[k];
+    hole = space_start + space_size;
 
     if (os_validate(hole, HOLE_SIZE) == NULL) {
         fprintf(stderr,
@@ -463,8 +463,8 @@ make_holes(void)
      * stacks are handled in make_stack_holes.
      */
 
-    make_hole(0);               /* Read-only space */
-    make_hole(1);               /* Static space */
+    make_hole(spaces[0], sapce_sizes[0]); /* Read-only space */
+    make_hole(spaces[1], space_sizes[1]); /* Static space */
     
     /* Round up the dynamic_space_size to the nearest SPARSE_BLOCK_SIZE */
     dynamic_space_size = round_up_sparse_size(dynamic_space_size);
@@ -495,8 +495,8 @@ make_holes(void)
 void
 make_stack_holes(void)
 {
-    make_hole(2);
-    make_hole(3);
+    make_hole(control_stack, control_stack_size);
+    make_hole(binding_stack, binding_stack_size);
 }
     
 void *
-- 
GitLab