mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-10-01 01:36:01 -04:00
add comment about special small size classes
This commit is contained in:
parent
422ee78b3e
commit
8d61e63274
@ -193,6 +193,7 @@ static inline struct size_info get_size_info(size_t size) {
|
||||
if (size == 0) {
|
||||
return (struct size_info){0, 0};
|
||||
}
|
||||
// size <= 64 is needed for correctness and raising it to size <= 128 is an optimization
|
||||
if (size <= 128) {
|
||||
return (struct size_info){align(size, 16), ((size - 1) >> 4) + 1};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user