-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid assertion messages in free_list_allocator in release builds. (#7)
Change some `assert`s to `debug_assert`s, for smaller code size in release builds. And, avoid doing an integer divison in `round_up` and `multiple_below`, by taking advantage of the fact that the denominator is always a power of two. These functions are often inlined, in which case the optimizer can see the powers of two and do this optimization itself, however this isn't always done when optimizing for size. --------- Co-authored-by: Craig <[email protected]>
- Loading branch information
1 parent
ed72a23
commit bde5e16
Showing
1 changed file
with
43 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