PATCH: tools/winewrapper and memory limits

Gerald Pfeifer gerald at pfeifer.com
Sat Jan 17 19:11:22 CST 2004


This would have saved me a _lot_ of time late last year.  With a
memory limit set too low, I would simply get an Abort, both when
running Wine itself and `ldd wine-binary`. :-(

This is not really FreeBSD-specific, for Marcus Meissner encountered the
problem on SUSE Linux as well; feel free to remove the first condition!

Gerald

ChangeLog:
Check whether there is sufficient memory to run Wine (FreeBSD only).
Index: winewrapper
===================================================================
RCS file: /home/wine/wine/tools/winewrapper,v
retrieving revision 1.8
diff -u -3 -p -r1.8 winewrapper
--- winewrapper	6 Nov 2003 01:17:56 -0000	1.8
+++ winewrapper	18 Jan 2004 00:53:10 -0000
@@ -79,7 +79,13 @@ then
     . $topdir/.winewrapper
 fi

-# and run the application
+# Do we have sufficient amounts of memory available?
+if [ `uname -s` = "FreeBSD" ] && [ `ulimit -d` -lt 270000 ]; then
+  echo "$0: not enough memory available -- any limits set?"
+  exit 1
+fi
+
+# Finally, run the application

 case "$0" in
   wine|*/wine)



More information about the wine-patches mailing list