On 8/21/21 12:01 PM, Bin Meng wrote:
> On Fri, Aug 20, 2021 at 11:52 PM Philippe Mathieu-Daudé
> <phi...@redhat.com> wrote:
>>
>> When Linux refuses to overcommit a seriously wild allocation we get:
>>
>>   $ qemu-system-i386 -m 40000000
>>   qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate 
>> memory
>>
>> Slighly improve the error message, displaying the memory size
> 
> typo: Slightly

Oops.

>>              if (!new_block->host) {
>> +                g_autofree char *size_s = 
>> size_to_str(new_block->max_length);
> 
> Does g_autofree work with every compiler we support?
> 
> Looks it only applies to GCC and clang?
> https://www.gitmemory.com/issue/linuxwacom/libwacom/142/518787578

Which are the only two supported by the project AFAIK.

g_autofree depends on glib, minimum available since commit 00f2cfbbec6
("glib: bump min required glib library version to 2.48").

Merged here:

commit 3590b27c7a2be7a24b4b265
Merge: d013d220c71 57b9f113fce
Date:   Thu Aug 22 17:57:09 2019 +0100

    Merge remote-tracking branch
    'remotes/berrange/tags/autofree-pull-request' into staging

    require newer glib2 to enable autofree'ing of stack
    variables exiting scope

> Tested-by: Bin Meng <bmeng...@gmail.com>

Thanks!


Reply via email to