Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
c40b7a6b
by Raymond Toy at 2017-08-29T10:38:13-07:00
-
48f8ebb9
by Raymond Toy at 2017-08-29T10:54:21-07:00
-
aba0bc5c
by Raymond Toy at 2017-08-29T10:56:15-07:00
-
dbf7c0af
by Raymond Toy at 2017-08-29T18:31:19+00:00
3 changed files:
Changes:
1 |
+;; Bootstrap file for linuu to move the heap to a higher address so
|
|
2 |
+;; that executables will work on newer OSes, as mentioned in issue
|
|
3 |
+;; #40.
|
|
4 |
+;;
|
|
5 |
+;; Use "bin/build.sh -B boot-2017-04" to build this.
|
|
6 |
+;;
|
|
7 |
+;; Also need to move the foreign linkage start to a different address
|
|
8 |
+;; because this also overlaps where the C code is placed in an
|
|
9 |
+;; executable image.
|
|
10 |
+;;
|
|
11 |
+;; This reduces the max total heap space on older systems, but it
|
|
12 |
+;; looks like newer systems have the C libraries and stack mapped at a
|
|
13 |
+;; much higher address.
|
|
14 |
+ |
|
15 |
+#+linux
|
|
16 |
+(setf (c::backend-foreign-linkage-space-start c::*target-backend*)
|
|
17 |
+ #x5f000000)
|
|
18 |
+ |
|
19 |
+#+linux
|
|
20 |
+(handler-bind
|
|
21 |
+ ((error (lambda (c)
|
|
22 |
+ (declare (ignore c))
|
|
23 |
+ (invoke-restart 'continue))))
|
|
24 |
+ (defconstant vm::target-foreign-linkage-space-start
|
|
25 |
+ (c:backend-foreign-linkage-space-start c::*target-backend*))
|
|
26 |
+ |
|
27 |
+ (defconstant vm::target-dynamic-space-start
|
|
28 |
+ #x60000000))
|
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 |
(setf (backend-page-size *target-backend*) 4096)
|
65 | 65 |
|
66 | 66 |
(setf (c::backend-foreign-linkage-space-start *target-backend*)
|
67 |
- #+linux #x58000000
|
|
67 |
+ #+linux #x5f000000
|
|
68 | 68 |
#+solaris #x30000000
|
69 | 69 |
#-(or linux solaris) #xB0000000
|
70 | 70 |
(c::backend-foreign-linkage-entry-size *target-backend*)
|
... | ... | @@ -235,7 +235,7 @@ |
235 | 235 |
#+FreeBSD #x28F00000
|
236 | 236 |
#-FreeBSD #x28000000)
|
237 | 237 |
(defconstant target-dynamic-space-start
|
238 |
- #+linux #x58100000
|
|
238 |
+ #+linux #x60000000
|
|
239 | 239 |
#+solaris #x40000000
|
240 | 240 |
#-(or linux solaris) #x48000000)
|
241 | 241 |
(defconstant target-foreign-linkage-space-start
|
... | ... | @@ -37,6 +37,24 @@ |
37 | 37 |
* However, Fedora 22 ther appears to be nothing mapped there. In
|
38 | 38 |
* fact it appears to be free all the way to 0xf7c1b000. That would
|
39 | 39 |
* allow a heap of size 2555 MB.
|
40 |
+ *
|
|
41 |
+ * On even newer OSes like Ubuntu 17.04, the map looks something like
|
|
42 |
+ *
|
|
43 |
+ * 0x00000000->0x10000000 128M ?
|
|
44 |
+ * 0x10000000->0x20000000 256M Read-Only Space.
|
|
45 |
+ * 0x20000000->0x28000000 128M Binding stack growing up.
|
|
46 |
+ * 0x28000000->0x38000000 256M Static Space.
|
|
47 |
+ * 0x38000000-> ?
|
|
48 |
+ * 0x56555000-> C space
|
|
49 |
+ * 0xf7dfe000-> [anon]
|
|
50 |
+ * 0xf7e00000->0xf7fb4000 libc.so
|
|
51 |
+ * 0xf7fb5000->0xf7fd9000 [anon]
|
|
52 |
+ * 0xf7fd9000->0xf7ffd000 ld.so
|
|
53 |
+ * 0xfffdd000-> [stack]
|
|
54 |
+ *
|
|
55 |
+ * There's a potential clash if the lisp heap is mapped near
|
|
56 |
+ * 0x58100000 as shown above. This happens if a lisp exectuable image
|
|
57 |
+ * is created.
|
|
40 | 58 |
*/
|
41 | 59 |
|
42 | 60 |
#define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
|