From d18be300ca410881c17a493753e728499371950d Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Mon, 15 Aug 2011 11:26:10 -0400 Subject: Compiler frees as much memory as possible before passing control to C compiler --- src/compiler.sml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compiler.sml') diff --git a/src/compiler.sml b/src/compiler.sml index 21ffae27..de6b14b4 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -1311,6 +1311,8 @@ val toSqlify = transform sqlify "sqlify" o toMono_opt2 val escapeFilename = String.translate (fn #" " => "\\ " | #"\"" => "\\\"" | #"'" => "\\'" | ch => str ch) +val beforeC = ref (fn () => ()) + fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = let val proto = Settings.currentProtocol () @@ -1348,6 +1350,7 @@ fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = (); OS.Process.isSuccess (OS.Process.system s)) in + !beforeC (); system compile andalso system link end -- cgit v1.2.3