Richard Henderson 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
>> +retu
Richard Henderson writes:
> On 7/17/20 7:24 AM, Christian Ehrhardt 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_p
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
On 7/17/20 7:24 AM, Christian Ehrhardt 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;
>
> The Linux man page
On Fri, Jul 17, 2020 at 3:32 PM BALATON Zoltan wrote:
> On Fri, 17 Jul 2020, Alex Bennée wrote:
> > This will be used in a future patch. For POSIX systems _SC_PHYS_PAGES
> > isn't standardised but at least appears in the man pages for
> > Open/FreeBSD. The result is advisory so any users of it sh
On Fri, 17 Jul 2020, Alex Bennée wrote:
This will be used in a future patch. For POSIX systems _SC_PHYS_PAGES
isn't standardised but at least appears in the man pages for
Open/FreeBSD. The result is advisory so any users of it shouldn't just
fail if we can't work it out.
The win32 stub currently
This will be used in a future patch. For POSIX systems _SC_PHYS_PAGES
isn't standardised but at least appears in the man pages for
Open/FreeBSD. The result is advisory so any users of it shouldn't just
fail if we can't work it out.
The win32 stub currently returns 0 until someone with a Windows sy