]> matita.cs.unibo.it Git - helm.git/commitdiff
matitacLib: Gc.compact added after the compilation of mmas
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Wed, 11 Mar 2009 18:39:42 +0000 (18:39 +0000)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Wed, 11 Mar 2009 18:39:42 +0000 (18:39 +0000)
            Now LAMBDA-TYPES compiles in ~ 100m
Makefile: daily test of LAMBDA-TYPES re-enabled

helm/software/matita/Makefile
helm/software/matita/matitacLib.ml

index 6bdba1baff31adaccce39610dac044f0d3499c32..28cc4c24f64f5823528d1d4cbaf3adbda0e0605a 100644 (file)
@@ -197,7 +197,7 @@ TEST_DIRS =                                 \
 #      library_auto                    
 TEST_DIRS_OPT =                        \
        $(TEST_DIRS)                    \
-       # contribs/LAMBDA-TYPES         \
+       contribs/LAMBDA-TYPES           \
        $(NULL)
 
 .PHONY: tests tests.opt cleantests cleantests.opt
index ff9fb1d73629a468b1cde028505c56eb7385a6e3..cfec1c5072512ace47dd29b2ef4ef505d48f1959 100644 (file)
@@ -381,6 +381,10 @@ module F =
       with Unix.Unix_error (Unix.ENOENT, "stat", f) when f = s -> None
     ;;
 
+(* FG: a problem was noticed in relising memory between subsequent *)
+(*     invocations of the compiler. The following might help       *)
+    let compact r = Gc.compact (); r
+
     let build options fname =
       let matita_debug = Helm_registry.get_bool "matita.debug" in
       let compile opts fname =
@@ -404,10 +408,10 @@ module F =
          let generated = Filename.chop_suffix fname ".mma" ^ ".ma" in
          let atexit = dump generated in
          let res = compile options fname in
-         let r = atexit res in
+         let r = compact (atexit res) in
          if r then r else begin
-           Sys.remove generated;
-           Printf.printf "rm %s\n" generated; flush stdout; r
+            Sys.remove generated;
+            Printf.printf "rm %s\n" generated; flush stdout; r
          end
       else
          compile options fname