Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: Avoid complex heap growth math in hot path
We do a lot of math about heap growth in hot path of grub_memalign(). However, the result is only used if out of memory is encountered, which is seldom. This patch moves these calculations away from hot path. These calculations are now only done if out of memory is encountered. This change can also help compiler to optimize integer overflow checks away. Signed-off-by: Zhang Boyang <[email protected]> Reviewed-by: Daniel Kiper <[email protected]> (cherry picked from commit 65bc459)
- Loading branch information