-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential 'Floating Point Exception' with speculative execution (#…
…93517) * Fix potential 'Floating Point Exception' with speculative execution * Rewrite the calculation of 'generation_allocator_efficiency' and 'generation_unusable_fragmentation' to remove floating point usage. - Rename 'generation_allocator_efficiency' to 'generation_allocator_efficiency_percent' because now it returns a number between 0 and 100. - Do not use 'generation_allocator_efficiency' in 'generation_unusable_fragmentation' and do direct calculation. * Use 'uint64_t' instead of 'size_t' for computing generation fragmentation. * Use 'size_t' instead of 'uint64_t' for return type. Also add comment to explain why we use integer division instead of floating point division. * Improve readability of the test * Remove cast from 'size_t' to 'int' when using 'generation_allocator_efficiency_percent'.
- Loading branch information
1 parent
7459797
commit ca46ae5
Showing
2 changed files
with
25 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters