/[cmucl]/src/lisp/x86-validate.h
ViewVC logotype

Contents of /src/lisp/x86-validate.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations)
Sun Aug 30 04:56:49 1998 UTC (15 years, 7 months ago) by dtc
Branch: MAIN
Changes since 1.6: +59 -31 lines
File MIME type: text/plain
Revise the address map to better utilise the address space, allowing
larger heaps and stacks:

* There is now the potential for up to 2.75GB dynamic space on
FreeBSD, and 1.75GB on linux.  Since GENCGC statically allocates page
tables the default size is set at just 1GB.

* The Read-only and Static spaces have been increased to 256MB
allowing larger heaps to be purified. The Read-only and Static spaces
are in the same locations for both the FreeBSD and Linux ports to
avoid unnecessary binary incompatibility.

* The Control stack and Binking stack now have room for upto 128MB,
supporting deeply nested algorithms, and potentially giving room for
subdivision for thread stacks.

* There is a reserve for the FreeBSD static libraries in the event
that the FreeBSD lisp binary is dynamically linked, and the foreign
segment size for FreeBSD is now 32MB, up from just 4MB.

* There is now significantly more room for C allocated memory, roughly
128M on Linux and 224M on FreeBSD.
1 ram 1.1 /*
2 dtc 1.7 *
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     * $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/x86-validate.h,v 1.7 1998/08/30 04:56:49 dtc Exp $
7     *
8     */
9    
10     /*
11     * Address map:
12     *
13     * FreeBSD:
14     * 0x00000000->0x0E000000 224M C program and memory allocation.
15     * 0x0E000000->0x10000000 32M Foreign segment.
16     * 0x10000000->0x20000000 256M Read-Only Space.
17     * 0x20000000->0x28000000 128M Reserved for shared libraries.
18     * 0x28000000->0x38000000 256M Static Space.
19     * 0x38000000->0x40000000 128M Binding stack growing up.
20     * 0x40000000->0x48000000 128M Control stack growing down.
21     * 0x48000000->0xC8000000 2GB Dynamic Space.
22     * 0xE0000000-> 256M C stack - Alien stack.
23     * Linux:
24     * 0x00000000->0x08000000 128M Unused.
25     * 0x08000000->0x10000000 128M C program and memory allocation.
26     * 0x10000000->0x20000000 256M Read-Only Space.
27     * 0x20000000->0x28000000 128M Binding stack growing up.
28     * 0x28000000->0x38000000 256M Static Space.
29     * 0x38000000->0x40000000 128M Control stack growing down.
30     * 0x40000000->0x48000000 128M Reserved for shared libraries.
31     * 0x48000000->0xB8000000 1.75G Dynamic Space.
32     *
33     */
34    
35     #define READ_ONLY_SPACE_START (0x10000000)
36     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
37    
38     #define STATIC_SPACE_START (0x28000000)
39     #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
40    
41     #ifdef __FreeBSD__
42     #define BINDING_STACK_START (0x38000000)
43     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
44     #define CONTROL_STACK_START (0x40000000)
45     #define CONTROL_STACK_SIZE (0x08000000) /* 128MB */
46     #endif
47 ram 1.1
48 dtc 1.7 #ifdef __linux__
49     #define BINDING_STACK_START (0x20000000)
50     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
51     #define CONTROL_STACK_START (0x30001000)
52     #define CONTROL_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
53     #endif
54 ram 1.1
55 dtc 1.7 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
56 ram 1.1
57 dtc 1.7 /* Note that GENCGC only uses dynamic_space 0. */
58     #define DYNAMIC_0_SPACE_START (0x48000000)
59 dtc 1.4 #ifdef GENCGC
60 dtc 1.7 #ifdef __FreeBSD__
61     #define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
62 dtc 1.4 #endif
63 dtc 1.7 #ifdef __linux__
64     #define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 1.75GB */
65 dtc 1.3 #endif
66     #else
67 dtc 1.4 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
68 dtc 1.3 #endif
69 ram 1.1
70 dtc 1.7 #define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)

  ViewVC Help
Powered by ViewVC 1.1.5