Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/include/ml-limits.h
ViewVC logotype

Annotation of /sml/trunk/src/runtime/include/ml-limits.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1747 - (view) (download) (as text)

1 : monnier 249 /* ml-limits.h
2 :     *
3 :     * COPYRIGHT (c) 1992 AT&T Bell Laboratories
4 :     *
5 :     * Various limits and default settings for the SML/NJ run-time system.
6 :     */
7 :    
8 :     #ifndef _ML_DEFAULTS_
9 :     #define _ML_DEFAULTS_
10 :    
11 :     #include "ml-base.h"
12 :    
13 : mblume 1747 /* default image: NULL (means: try to find in-core image using dlopen/dlsym) */
14 : monnier 249 #ifndef DFLT_IMAGE
15 : mblume 1747 #define DFLT_IMAGE NULL
16 : monnier 249 #endif
17 :    
18 :     /* the maximum length of a boot-file pathname */
19 :     #ifndef MAX_BOOT_PATH_LEN
20 :     # define MAX_BOOT_PATH_LEN 512
21 :     #endif
22 :    
23 :     /* the maximum number of boot files */
24 :     #ifndef MAX_NUM_BOOT_FILES
25 :     # define MAX_NUM_BOOT_FILES 1024
26 :     #endif
27 :    
28 :     /** Multiprocessor limits **/
29 :     #ifdef MP_SUPPORT
30 :     # ifndef MAX_NUM_PROCS
31 :     # define MAX_NUM_PROCS 8
32 :     # endif
33 :     #else
34 :     # define MAX_NUM_PROCS 1
35 :     #endif
36 :    
37 :    
38 :     /** Default heap sizes **/
39 :     #ifndef DFLT_NGENS
40 :     # define DFLT_NGENS 5
41 :     #endif
42 :     #define MAX_NGENS 14 /* should agree with MAX_NUM_GENS in */
43 :     /* arena-id.h. */
44 :     #define DFLT_CACHE_GEN 2 /* Cache from-space for gens 1 & 2 */
45 :     #ifndef DFLT_ALLOC
46 :     # define DFLT_ALLOC (256*ONE_K)
47 :     #endif
48 :     #ifdef OLD_POLICY
49 :     #define RATIO_UNIT 16 /* ratios are measured in 1/16ths */
50 :     #define DFLT_RATIO1 (7*(RATIO_UNIT/2)) /* gen-1 arenas are small */
51 :     #define DFLT_RATIO (3*RATIO_UNIT)
52 :     #define MAX_SZ1(NSZ) (5*(NSZ))
53 :     #endif
54 :     #define DFLT_RATIO1 20
55 :     #define DFLT_RATIO2 10
56 :     #define DFLT_RATIO 5
57 :     #define MAX_SZ1(NSZ) (6*(NSZ))
58 :    
59 :     /* the generation to allocate code objects in */
60 :     #define CODE_ALLOC_GEN 2
61 :    
62 :     /* the size (in words) of a "small object." The C allocation routines allocate
63 :     * small objects in the allocation space, while large objects are allocated
64 :     * in the first generation.
65 :     */
66 :     #define SMALL_OBJ_SZW 512
67 :    
68 :     /* This is the size (in bytes) of the allocation buffer. If A is the value
69 :     * of the limit pointer, then A[HEAP_BUF_SZ-1] is the address of the next
70 :     * store-vector location.
71 :     */
72 :     #define HEAP_BUF_SZ (1024 + 128)
73 :     #define HEAP_BUF_SZB (HEAP_BUF_SZ*WORD_SZB)
74 :    
75 :     /* The maximum number of global C variables that can be roots. */
76 :     #define MAX_C_ROOTS 8
77 :    
78 :     /* maximum number of additional roots that can be passed to GC */
79 :     #define NUM_EXTRA_ROOTS 16
80 :    
81 :     /* The number of potential GC roots. This includes space for C global roots,
82 :     * ML roots, and the terminating null pointer.
83 :     */
84 :     #ifdef N_PSEUDO_REGS
85 :     #define N_PSEUDO_ROOTS N_PSEUDO_REGS
86 :     #else
87 :     #define N_PSEUDO_ROOTS 0
88 :     #endif
89 :     #ifdef MP_SUPPORT
90 :     /*
91 :     * must assume that all other procs are supplying NUM_EXTRA_ROOTS
92 :     * in addition to the standard roots
93 :     */
94 :     # define NUM_GC_ROOTS \
95 :     ROUNDUP(MAX_NUM_PROCS*(MAX_C_ROOTS+NROOTS+N_PSEUDO_ROOTS)+ \
96 :     (MAX_NUM_PROCS-1)*NUM_EXTRA_ROOTS+1, 8)
97 :     #else
98 :     # define NUM_GC_ROOTS \
99 :     ROUNDUP(MAX_NUM_PROCS*(MAX_C_ROOTS+NROOTS+N_PSEUDO_ROOTS)+1, 8)
100 :     #endif
101 :    
102 :     #ifdef SOFT_POLL
103 :     /* limits for polling */
104 :     #define POLL_GRAIN_CPSI 1024 /* power of 2, in cps instructions */
105 :     #define POLL_GRAIN_BITS 10 /* log_2 POLL_GRAIN_CPSI */
106 :     #endif
107 :    
108 :     #endif /* !_ML_DEFAULTS_ */
109 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0