SCM Repository
Diff of /sml/trunk/config/_run-sml
Parent Directory
|
Revision Log
|
Patch
revision 214, Mon Jan 18 20:12:03 1999 UTC | revision 569, Tue Mar 7 04:01:07 2000 UTC | |
---|---|---|
# | Line 55 | Line 55 |
55 | # special shortcut for frequent use (and for Linux' binfmt) | # special shortcut for frequent use (and for Linux' binfmt) |
56 | case "$1" in /* | ./* | ../* ) HEAP="@SMLload=$1"; shift ;; esac | case "$1" in /* | ./* | ../* ) HEAP="@SMLload=$1"; shift ;; esac |
57 | ||
58 | ALLOC="" | |
59 | ||
60 | # | # |
61 | # Process command line arguments | # Process command line arguments |
62 | # | # |
# | Line 79 | Line 81 |
81 | echo "$CMD @VERSION@" | echo "$CMD @VERSION@" |
82 | exit 0 | exit 0 |
83 | ;; | ;; |
84 | @SMLalloc=*) | |
85 | ALLOC=$arg | |
86 | ;; | |
87 | *) | *) |
88 | ARGS="$ARGS $arg" | ARGS="$ARGS $arg" |
89 | ;; | ;; |
90 | esac | esac |
91 | done | done |
92 | ||
93 | # | |
94 | # Try to figure out the CPU's cache size and set the allocation area | |
95 | # size accordingly. This is majorly important for Celeron systems | |
96 | # which suffer badly when the allocation area is too big. | |
97 | # | |
98 | if [ "$ALLOC" = "" ] ; then | |
99 | if [ -f /proc/cpuinfo ] ; then | |
100 | # "head" is called to make sure we consider only one matching line. | |
101 | # (On linux SMP systems there is more than one such line.) | |
102 | cache=`fgrep 'cache size' </proc/cpuinfo | head -1` | |
103 | if [ $? = 0 ] ; then | |
104 | kb=`echo $cache | sed -e 's/^[^0-9]*\([0-9]*\).*$/\1/'` | |
105 | case $kb in | |
106 | 128) | |
107 | # This is the Celeron case. | |
108 | ALLOC="@SMLalloc=32k" | |
109 | ;; | |
110 | 256) | |
111 | # Do CPUs like this exist? | |
112 | ALLOC="@SMLalloc=128k" | |
113 | ;; | |
114 | 512) | |
115 | # The Pentium II case... | |
116 | ALLOC="@SMLalloc=512k" | |
117 | ;; | |
118 | *) | |
119 | ;; | |
120 | esac | |
121 | fi | |
122 | fi | |
123 | fi | |
124 | ||
125 | if [ "$RUN" = "" ]; then | if [ "$RUN" = "" ]; then |
126 | # | # |
127 | # Construct the runtime system path from the ARCH and OS | # Construct the runtime system path from the ARCH and OS |
# | Line 117 | Line 154 |
154 | # | # |
155 | # run the sucker! | # run the sucker! |
156 | # | # |
157 | exec $RUN @SMLcmdname=$0 $HEAP $ARGS | exec $RUN @SMLcmdname=$0 $HEAP $ALLOC $ARGS |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |