mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-15 07:01:42 +03:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -708,7 +708,7 @@ sa2u(size_t size, size_t alignment)
|
|||
* Calculate the size of the over-size run that arena_palloc()
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue