Re: [PATCH 5/6] libpager: Fix overallocating pagemap

2021-05-08 Thread Samuel Thibault
Sergey Bugaev, le jeu. 06 mai 2021 15:56:30 +0300, a ecrit: > The code tried to round up the allocation size to a multiple of page size. > But we actually allocate newsize * sizeof (*p->pagemap) bytes, not newsize > bytes, which meant allocations were sizeof (*p->pagemap) times larger than > they n

[PATCH 5/6] libpager: Fix overallocating pagemap

2021-05-06 Thread Sergey Bugaev
The code tried to round up the allocation size to a multiple of page size. But we actually allocate newsize * sizeof (*p->pagemap) bytes, not newsize bytes, which meant allocations were sizeof (*p->pagemap) times larger than they needed to be. --- libpager/pagemap.c | 9 + 1 file changed,