Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
qemu-linux-user.401
0038-Raise-soft-address-space-limit-to-h.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0038-Raise-soft-address-space-limit-to-h.patch of Package qemu-linux-user.401
From 16ae9d4f8ca1e7133a9abe25d09f23bfa5b210e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de> Date: Sun, 15 Jan 2012 19:53:49 +0100 Subject: [PATCH] Raise soft address space limit to hard limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For SLES we want users to be able to use large memory configurations with KVM without fiddling with ulimit -Sv. Signed-off-by: Andreas Färber <afaerber@suse.de> [BR: add include for sys/resource.h] Signed-off-by: Bruce Rogers <brogers@suse.com> --- vl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/vl.c b/vl.c index b18c815..1459ffd 100644 --- a/vl.c +++ b/vl.c @@ -27,6 +27,7 @@ #include <time.h> #include <errno.h> #include <sys/time.h> +#include <sys/resource.h> #include "config-host.h" @@ -2965,11 +2966,22 @@ int main(int argc, char **argv, char **envp) }; const char *trace_events = NULL; const char *trace_file = NULL; + struct rlimit rlimit_as; atexit(qemu_run_exit_notifiers); error_set_progname(argv[0]); qemu_init_exec_dir(argv[0]); + /* + * Try to raise the soft address space limit. + * Default on SLES 11 SP2 is 80% of physical+swap memory. + */ + getrlimit(RLIMIT_AS, &rlimit_as); + if (rlimit_as.rlim_cur < rlimit_as.rlim_max) { + rlimit_as.rlim_cur = rlimit_as.rlim_max; + setrlimit(RLIMIT_AS, &rlimit_as); + } + g_mem_set_vtable(&mem_trace); module_call_init(MODULE_INIT_QOM);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor