Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: mempool - Centralize p_{m,re}alloc() size checks
Instead of each mempool implementation having to check the allocation sizes for sanity, we can check that the sizes are within the required bounds in p_malloc() and p_realloc(). Since p_malloc() and p_realloc() are static inlines, some consumers will see a little bit of growth in binary size, but others will be able to optimize the check away at compile time.
- Loading branch information
1 parent
f4cac7d
commit 3611195
Showing
6 changed files
with
6 additions
and
30 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
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
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