[MLton-user] out of memory

Sean McLaughlin seanmcl at gmail.com
Tue Jun 1 09:18:29 PDT 2010


Hi,

  I'm getting an out-of-memory error from MLton, though I have 4GB of
memory.  I don't understand it because my program
is significantly smaller than the MLton source.  Is there a way around this?

Thanks,

Sean

Here it is with -verbose 1

MLton r7454 (built Sat May  1 18:06:30 EDT 2010 on
sean-mclaughlins-macbook-pro.local)
MLton starting
   Compile SML starting
      pre codegen starting
Out of memory.  Unable to allocate heap with 1,192,034,304 bytes.

      178.41 real       161.02 user        15.34 sys

and with -verbose 2

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


real    2m50.801s
user    2m31.598s
sys    0m15.901s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton-user/attachments/20100601/1e4c2533/attachment.htm


More information about the MLton-user mailing list