On 2018-08-19 14:37, Andy Shevchenko wrote:
> On Sat, Aug 18, 2018 at 4:17 PM Rasmus Villemoes
> wrote:
>>
>> int bitmap_print_to_pagebuf(bool list, char *buf, const unsigned long
>> *maskp,
>> int nmaskbits)
>> {
>> - ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE
On Sat, Aug 18, 2018 at 4:17 PM Rasmus Villemoes
wrote:
>
> For various alignments of buf, the current expression computes
>
> 4096 ok
> 4095 ok
> 8190
> 8189
> ...
> 4097
>
> i.e., if the caller has already written two bytes into the page buffer,
> len is 8190 rather than 4094, because PTR_ALIGN
For various alignments of buf, the current expression computes
4096 ok
4095 ok
8190
8189
...
4097
i.e., if the caller has already written two bytes into the page buffer,
len is 8190 rather than 4094, because PTR_ALIGN aligns up to the next
boundary. So if the printed version of the bitmap is huge
3 matches
Mail list logo