Detecting ulimit problem

Daniel Kegel dank at
Thu May 19 16:10:31 CDT 2005

efrias at wrote:
> [Proposed fix:]
> 	struct rlimit address_limits;
> 	int required_address_space = 1024 * 1024 * 1400; /* 1400M */
> 	getrlimit(RLIMIT_AS, &address_limits);
> 	if (address_limits.rlim_max < required_address_space)
> 		WINE_WARN("Your virtual memory limit is set to %dk, which 
> will\nprobably prevent wine from loading correctly.  If you get an 
> error,\nincrease the limit with 'ulimit -v' to at least %dk.\n", 
> address_limits.rlim_max / 1024, required_address_space / 1024);

Looks groovy to me.  But it will completely annoy people
using 2.4 kernels, which by default have only 896MB of
user address space, won't it?  (I may be confused here, but
that's what I remember.)

See e.g.
+  On a system with 1 gigabyte of memory, you may get 896 MB of
+  "user memory" and 128 megabytes of "high memory" with this
+  selection. This is the usual setting.

So I'd encourage you to submit a patch to do this, but only
after testing on Red Hat 9.0 to make sure I'm wrong :-)

More information about the wine-devel mailing list