[PATCH 1/2] loader: Reduce data segment size in wine-pthread/kthread on FreeBSD.

Charlie root at kalimero.kotnet.org
Wed Sep 26 12:17:44 CDT 2007


This allows running wine-[kp]thread directly, which is useful for
running under gdb. Currently they segfault when trying to setup
user_shared_data.

---
 loader/main.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
-------------- next part --------------
diff --git a/loader/main.c b/loader/main.c
index 5e0f330..ab448bf 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -26,6 +26,9 @@
 #ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
 #endif
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/resource.h>
+#endif
 
 #include "wine/library.h"
 #include "main.h"
@@ -99,6 +102,12 @@ int main( int argc, char *argv[] )
 {
     char error[1024];
     int i;
+#if defined(__FreeBSD__)
+    struct rlimit rl;
+    rl.rlim_cur = 0x02000000;
+    rl.rlim_max = 0x02000000;
+    setrlimit( RLIMIT_DATA, &rl );
+#endif
 
     check_command_line( argc, argv );
     if (wine_main_preload_info)


More information about the wine-patches mailing list