[MLton-devel] cvs commit: fixed file descriptor leak in vliw benchmark
Stephen Weeks
sweeks@users.sourceforge.net
Thu, 01 May 2003 15:57:19 -0700
sweeks 03/05/01 15:57:19
Modified: benchmark/tests vliw.sml
Log:
In vliw, there was a file that was opened and never closed. This
caused there to be as many open files as there were iterations of the
benchmark. On SunOS, this caused a "Too many open files" error.
Revision Changes Path
1.3 +3 -1 mlton/benchmark/tests/vliw.sml
Index: vliw.sml
===================================================================
RCS file: /cvsroot/mlton/mlton/benchmark/tests/vliw.sml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vliw.sml 27 Sep 2002 23:46:29 -0000 1.2
+++ vliw.sml 1 May 2003 22:57:19 -0000 1.3
@@ -3617,7 +3617,9 @@
fun doitx (ifile:string, ofile:string, c_ofile:string, ws:int) =
let val foo = Ntypes.init_names()
- val i = (dodelay o BreakInst.breaki o ReadAbs.read o open_in) ifile
+ val ins = open_in ifile
+ val i = (dodelay o BreakInst.breaki o ReadAbs.read) ins
+ val _ = close_in ins
val (j, p) = time "Building Nodes" (fn () => ReadI.readI i)
val x = time "writing unopt" (fn () => writeprog(ofile, j, p))
fun cwin p = Compress.compress(ws, p)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel