Fix sa2u() regression.
Take large_pad into account when determining whether an aligned
allocation can be satisfied by a large size class.
This regression was introduced by
8a03cf039c
(Implement cache index
randomization for large allocations.).
This commit is contained in:
parent
50883deb6e
commit
4becdf21dc
@ -708,7 +708,7 @@ sa2u(size_t size, size_t alignment)
|
|||||||
* Calculate the size of the over-size run that arena_palloc()
|
* Calculate the size of the over-size run that arena_palloc()
|
||||||
* would need to allocate in order to guarantee the alignment.
|
* would need to allocate in order to guarantee the alignment.
|
||||||
*/
|
*/
|
||||||
if (usize + alignment - PAGE <= arena_maxrun)
|
if (usize + large_pad + alignment - PAGE <= arena_maxrun)
|
||||||
return (usize);
|
return (usize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user