Split x86-validate into separate files.
[projects/cmucl/cmucl.git] / src / lisp / x86-validate-darwin.h
1 /*
2  *
3  * This code was written as part of the CMU Common Lisp project at
4  * Carnegie Mellon University, and has been placed in the public domain.
5  *
6  */
7
8 #ifndef _X86_VALIDATE_DARWIN_H_
9 #define _X86_VALIDATE_DARWIN_H_
10
11 /*
12  * Also look in compiler/x86/parms.lisp for some of the parameters.
13  */
14
15 #define READ_ONLY_SPACE_START   (SpaceStart_TargetReadOnly)
16 #define READ_ONLY_SPACE_SIZE    (0x0ffff000)    /* 256MB - 1 page */
17
18 #define STATIC_SPACE_START      (SpaceStart_TargetStatic)
19 #define STATIC_SPACE_SIZE       (0x0ffff000)    /* 256MB - 1 page */
20
21 #define BINDING_STACK_START     (0x38000000)
22 #define BINDING_STACK_SIZE      (0x07fff000)    /* 128MB - 1 page */
23
24 #define CONTROL_STACK_START     (0x40000000)
25
26 /*
27  * According to /usr/include/sys/signal.h, MINSIGSTKSZ is 32K and
28  * SIGSTKSZ is 128K.  We should account for that appropriately.
29  */
30 #define CONTROL_STACK_SIZE      (0x07fdf000)    /* 128MB - SIGSTKSZ - 1 page */
31
32 #define SIGNAL_STACK_START      (0x47fe0000)    /* One page past the end of the control stack */
33 #define SIGNAL_STACK_SIZE       SIGSTKSZ
34
35 #define DYNAMIC_0_SPACE_START   (SpaceStart_TargetDynamic)
36 #ifdef GENCGC
37
38 /*
39  * On Darwin, /usr/lib/dyld appears to always be loaded at address
40  * #x8fe2e000.  Hence, the maximum dynamic space size is 1206050816
41  * bytes, or just over 1.150 GB.  Set the limit to 1.150 GB.
42  */
43 #define DYNAMIC_SPACE_SIZE      (0x47E00000U)   /* 1.150GB */
44
45 #else
46 #define DYNAMIC_SPACE_SIZE      (0x04000000U)   /* 64MB */
47 #endif
48
49 #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000U)   /* 512MB */
50
51 #ifdef LINKAGE_TABLE
52 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
53 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000)   /* 1MB */
54 #endif
55
56 #endif /*_X86_VALIDATE_DARWIN_H_*/