|
From: | Alex Bennée |
Subject: | Re: [PATCH v1 4/5] util: add qemu_get_host_physmem utility function |
Date: | Tue, 21 Jul 2020 16:58:39 +0100 |
User-agent: | mu4e 1.5.5; emacs 28.0.50 |
Richard Henderson <richard.henderson@linaro.org> writes: > On 7/17/20 3:51 AM, Alex Bennée wrote: >> +size_t qemu_get_host_physmem(void) >> +{ >> +#ifdef _SC_PHYS_PAGES >> + long pages = sysconf(_SC_PHYS_PAGES); >> + if (pages > 0) { >> + return pages * qemu_real_host_page_size; >> + } >> +#endif >> + return 0; >> +} > > Is it worth examining our own RLIMIT_{AS,DATA} as well? We don't anywhere else in the code so for now I'd say not. > > I suppose that's not usually what is tweaked in the example of a ram-limited > container... > > > r~ -- Alex Bennée
[Prev in Thread] | Current Thread | [Next in Thread] |