qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 fixed 11/16] util/mmap-alloc: Prepare for resizable mmaps


From: David Hildenbrand
Subject: Re: [PATCH v2 fixed 11/16] util/mmap-alloc: Prepare for resizable mmaps
Date: Mon, 24 Feb 2020 12:00:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 19.02.20 23:50, Peter Xu wrote:
> On Wed, Feb 12, 2020 at 02:42:49PM +0100, David Hildenbrand wrote:
>> @@ -178,13 +183,15 @@ void *qemu_ram_mmap(int fd,
>>      size_t offset, total;
>>      void *ptr, *guardptr;
>>  
>> +    g_assert(QEMU_IS_ALIGNED(size, pagesize));
> 
> (NOTE: assertion is fine, but as I mentioned in previous patch, I
>  think this pagesize could not be the real one that's going to be
>  mapped...)

Right, maybe rename mmap_pagesize() to mmap_guard_pagesize() and provide
the real pagesize via mmap_pagesize() + assert sizes against that.


-- 
Thanks,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]