Hi,<br><br> I'm getting an out-of-memory error from MLton, though I have 4GB of memory. I don't understand it because my program<br>is significantly smaller than the MLton source. Is there a way around this?<br>
<br>Thanks,<br><br>Sean<br><br>Here it is with -verbose 1<br><br>MLton r7454 (built Sat May 1 18:06:30 EDT 2010 on sean-mclaughlins-macbook-pro.local)<br>MLton starting<br> Compile SML starting<br> pre codegen starting<br>
Out of memory. Unable to allocate heap with 1,192,034,304 bytes.<br><br> 178.41 real 161.02 user 15.34 sys<br><br>and with -verbose 2<br><br>~/save/projects/imogen/modal-prop<br>$ time mlton -verbose 2 -const 'Exn.keepHistory true' -mlb-path-map /Users/seanmcl/save/projects/imogen/modal-prop/build/imogen.map -default-ann 'allowFFI false' -default-ann 'nonexhaustiveMatch error' -default-ann 'nonexhaustiveExnMatch default' -default-ann 'redundantMatch error' -default-ann 'sequenceNonUnit error' -default-ann 'warnUnused true' -output /Users/seanmcl/save/projects/imogen/modal-prop/bin/imogen /Users/seanmcl/save/projects/imogen/modal-prop/build/imogen.mlb<br>
MLton starting<br>MLton r7454 (built Sat May 1 18:06:30 EDT 2010 on sean-mclaughlins-macbook-pro.local)<br> created this file on Tue Jun 01 12:14:25 2010.<br>Do not edit this file.<br>Flag settings: <br> align: 4<br>
atMLtons: (/Users/seanmcl/save/projects/imogen/modal-prop/bin/imogen, @MLton, --)<br>
chunk: chunk per function<br> closureConvertGlobalize: true<br> closureConvertShrink: true<br> codegen: x86<br> contifyIntoMain: false<br> debug: false<br> defaultChar: char8<br> defaultWideChar: widechar32<br>
defaultInt: int32<br> defaultReal: real64<br> defaultWord: word32<br> diag passes: []<br> drop passes: []<br> elaborate allowConstant (default): false<br> elaborate allowConstant (enabled): true<br> elaborate allowFFI (default): false<br>
elaborate allowFFI (enabled): true<br> elaborate allowPrim (default): false<br> elaborate allowPrim (enabled): true<br> elaborate allowOverload (default): false<br> elaborate allowOverload (enabled): true<br> elaborate allowRebindEquals (default): false<br>
elaborate allowRebindEquals (enabled): true<br> elaborate deadCode (default): false<br> elaborate deadCode (enabled): true<br> elaborate forceUsed (default): false<br> elaborate forceUsed (enabled): true<br> elaborate ffiStr (default): <br>
elaborate ffiStr (enabled): true<br> elaborate nonexhaustiveExnMatch (default): default<br> elaborate nonexhaustiveExnMatch (enabled): true<br> elaborate nonexhaustiveMatch (default): error<br> elaborate nonexhaustiveMatch (enabled): true<br>
elaborate redundantMatch (default): error<br> elaborate redundantMatch (enabled): true<br> elaborate sequenceNonUnit (default): error<br> elaborate sequenceNonUnit (enabled): true<br> elaborate warnUnused (default): true<br>
elaborate warnUnused (enabled): true<br> elaborate only: false<br> emit main: true<br> export header: None<br> exn history: true<br> generated output format: executable<br> gc check: Limit<br> indentation: 3<br>
inlineIntoMain: true<br> inlineLeafA: {loops = true, repeat = true, size = Some 20}<br> inlineLeafB: {loops = true, repeat = true, size = Some 40}<br> inlineNonRec: {small = 60, product = 320}<br> input file: imogen<br>
keep CoreML: false<br> keep def use: true<br> keep dot: false<br> keep Machine: false<br> keep passes: []<br> keep RSSA: false<br> keep SSA: false<br> keep SSA2: false<br> keep SXML: false<br> keep XML: false<br>
extra_: true<br> lib dir: /usr/local/lib/mlton<br> lib target dir: /usr/local/lib/mlton/targets/self<br> loop passes: 1<br> mark cards: true<br> max function size: 10000<br> mlb path vars: [{var = MLTON_ROOT, path = $(LIB_MLTON_DIR)/sml}, {var = SML_LIB, path = $(LIB_MLTON_DIR)/sml}, {var = DEBUG', path = user,on,off}, {var = DEBUG, path = user}, {var = ASSERT', path = user,on,off}, {var = ASSERT, path = on}, {var = SYMBOLS', path = slow,fast}, {var = SYMBOLS, path = slow}, {var = TIME_LIMIT', path = time-limit,time-limit-no-warning}, {var = TIME_LIMIT, path = time-limit-no-warning}, {var = TIMING', path = timing-timing-dummy}, {var = TIMING, path = timing-dummy}, {var = ORD_SET', path = splay,red-black}, {var = ORD_SET, path = splay}, {var = ORD_MAP', path = splay,red-black}, {var = ORD_MAP, path = splay}]<br>
native commented: 0<br> native live stack: false<br> native optimize: 1<br> native move hoist: true<br> native copy prop: true<br> native copy prop cutoff: 1000<br> native cutoff: 100<br> native live transfer: 8<br>
native shuffle: true<br> native ieee fp: false<br> native split: Some 20000<br> optimizationPasses: [<ssa2::default>, <ssa::default>, <sxml::default>, <xml::default>]<br> polyvariance: Some {hofo = true, rounds = 2, small = 30, product = 300}<br>
prefer abs paths: false<br> prof passes: []<br> profile: CallStack<br> profile branch: false<br> profile C: []<br> profile IL: ProfileSource<br> profile include/exclude: [(Seq [Star [.], Or [Seq [Seq [[$], [(], [S], [M], [L], [_], [L], [I], [B], [)]]]], Star [.]], false)]<br>
profile raise: true<br> profile stack: false<br> profile val: false<br> show basis: None<br> show def-use: None<br> show types: true<br> target: self<br> target arch: X86<br> target OS: Darwin<br> type check: false<br>
verbosity: Pass<br> warn unrecognized annotation: true<br> zone cut depth: 100<br> Compile SML starting<br> pre codegen starting<br> parseAndElaborate starting<br> parseAndElaborate finished in 7.66 + 6.22 (45% GC)<br>
Warning: /Users/seanmcl/save/projects/imogen/modal-prop/src/constr/solver.fun 284.5.<br> Unused variable: entails.<br> deadCode starting<br> deadCode finished in 0.09 + 0.00 (0% GC)<br> defunctorize starting<br>
defunctorize finished in 1.45 + 0.01 (1% GC)<br> xmlSimplify starting<br> typeCheck starting<br> typeCheck finished in 1.07 + 0.00 (0% GC)<br> xmlShrink starting<br> xmlShrink finished in 0.94 + 0.72 (44% GC)<br>
xmlSimplifyTypes starting<br> xmlSimplifyTypes finished in 0.26 + 0.00 (0% GC)<br> typeCheck starting<br> typeCheck finished in 0.63 + 0.00 (0% GC)<br> xmlSimplify finished in 2.90 + 0.72 (20% GC)<br>
monomorphise starting<br> monomorphise finished in 1.04 + 0.00 (0% GC)<br> sxmlSimplify starting<br> typeCheck starting<br> typeCheck finished in 0.55 + 0.00 (0% GC)<br> sxmlShrink1 starting<br>
sxmlShrink1 finished in 0.97 + 0.00 (0% GC)<br> implementSuffix starting<br> implementSuffix finished in 0.04 + 0.48 (92% GC)<br> sxmlShrink2 starting<br> sxmlShrink2 finished in 0.52 + 0.00 (0% GC)<br>
implementExceptions starting<br> implementExceptions finished in 0.06 + 0.00 (0% GC)<br> sxmlShrink3 starting<br> sxmlShrink3 finished in 0.68 + 0.00 (0% GC)<br> polyvariance starting<br>
duplicate1 starting<br> duplicate1 finished in 1.16 + 0.78 (40% GC)<br> duplicate2 starting<br> duplicate2 finished in 1.19 + 1.38 (54% GC)<br> polyvariance finished in 2.35 + 2.15 (48% GC)<br>
sxmlShrink4 starting<br> sxmlShrink4 finished in 0.97 + 0.00 (0% GC)<br> typeCheck starting<br> typeCheck finished in 0.50 + 0.00 (0% GC)<br> sxmlSimplify finished in 6.64 + 2.64 (28% GC)<br>
closureConvert starting<br> flow analysis starting<br> flow analysis finished in 0.32 + 0.00 (0% GC)<br> free variables starting<br> free variables finished in 0.21 + 0.00 (0% GC)<br> globalize starting<br>
globalize finished in 0.08 + 0.00 (0% GC)<br> convert starting<br> convert finished in 1.81 + 3.04 (63% GC)<br> closureConvert finished in 2.56 + 3.04 (54% GC)<br> ssaSimplify starting<br> typeCheck starting<br>
typeCheck finished in 1.15 + 0.00 (0% GC)<br> removeUnused1 starting<br> removeUnused1 finished in 1.51 + 0.00 (0% GC)<br> introduceLoops1 starting<br> introduceLoops1 finished in 0.03 + 0.00 (0% GC)<br>
loopInvariant1 starting<br> loopInvariant1 finished in 0.73 + 0.00 (0% GC)<br> inlineLeaf1 starting<br> inlineLeaf1 finished in 0.85 + 0.77 (48% GC)<br> inlineLeaf2 starting<br> inlineLeaf2 finished in 0.67 + 0.00 (0% GC)<br>
contify1 starting<br> contify1 finished in 0.62 + 0.00 (0% GC)<br> localFlatten1 starting<br> localFlatten1 finished in 0.59 + 0.00 (0% GC)<br> constantPropagation starting<br> constantPropagation finished in 1.31 + 0.74 (36% GC)<br>
useless starting<br> useless finished in 1.34 + 0.00 (0% GC)<br> removeUnused2 starting<br> removeUnused2 finished in 0.61 + 0.00 (0% GC)<br> simplifyTypes starting<br> simplifyTypes finished in 0.47 + 0.36 (43% GC)<br>
polyEqual starting<br> polyEqual finished in 0.04 + 0.00 (0% GC)<br> polyHash starting<br> polyHash finished in 0.04 + 0.00 (0% GC)<br> introduceLoops2 starting<br> introduceLoops2 finished in 0.01 + 0.00 (0% GC)<br>
loopInvariant2 starting<br> loopInvariant2 finished in 0.24 + 0.00 (0% GC)<br> contify2 starting<br> contify2 finished in 0.29 + 0.00 (0% GC)<br> inlineNonRecursive starting<br> inlineNonRecursive finished in 0.75 + 0.93 (55% GC)<br>
localFlatten2 starting<br> localFlatten2 finished in 0.76 + 0.00 (0% GC)<br> removeUnused3 starting<br> removeUnused3 finished in 1.20 + 0.52 (30% GC)<br> contify3 starting<br> contify3 finished in 0.64 + 0.00 (0% GC)<br>
introduceLoops3 starting<br> introduceLoops3 finished in 0.01 + 0.00 (0% GC)<br> loopInvariant3 starting<br> loopInvariant3 finished in 0.72 + 0.00 (0% GC)<br> localRef starting<br> localRef finished in 0.90 + 1.07 (54% GC)<br>
flatten starting<br> flatten finished in 0.98 + 0.00 (0% GC)<br> localFlatten3 starting<br> localFlatten3 finished in 0.73 + 0.00 (0% GC)<br> combineConversions starting<br> combineConversions finished in 0.67 + 0.00 (0% GC)<br>
commonArg starting<br> commonArg finished in 0.95 + 0.68 (42% GC)<br> commonSubexp starting<br> commonSubexp finished in 0.92 + 0.00 (0% GC)<br> commonBlock starting<br> commonBlock finished in 0.55 + 0.00 (0% GC)<br>
redundantTests starting<br> redundantTests finished in 0.81 + 0.00 (0% GC)<br> redundant starting<br> redundant finished in 0.43 + 0.42 (49% GC)<br> knownCase starting<br> knownCase finished in 1.55 + 0.37 (19% GC)<br>
removeUnused4 starting<br> removeUnused4 finished in 0.82 + 0.00 (0% GC)<br> orderFunctions1 starting<br> orderFunctions1 finished in 0.12 + 0.00 (0% GC)<br> typeCheck starting<br> typeCheck finished in 0.66 + 0.00 (0% GC)<br>
ssaSimplify finished in 24.69 + 5.87 (19% GC)<br> toSsa2 starting<br> toSsa2 finished in 0.57 + 0.42 (42% GC)<br> ssa2Simplify starting<br> typeCheck starting<br> typeCheck finished in 0.55 + 0.00 (0% GC)<br>
deepFlatten starting<br>Out of memory. Unable to allocate heap with 1,192,034,304 bytes.<br><br><br>real 2m50.801s<br>user 2m31.598s<br>sys 0m15.901s<br><br>