mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-05-24 08:51:14 -04:00
delay allocating slab metadata from reservation
This commit is contained in:
parent
74139112d0
commit
fe30f6c2ea
2 changed files with 13 additions and 5 deletions
12
util.h
12
util.h
|
@ -7,6 +7,18 @@
|
|||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
|
||||
#define min(x, y) ({ \
|
||||
__typeof__(x) _x = (x); \
|
||||
__typeof__(y) _y = (y); \
|
||||
(void) (&_x == &_y); \
|
||||
_x < _y ? _x : _y; })
|
||||
|
||||
#define max(x, y) ({ \
|
||||
__typeof__(x) _x = (x); \
|
||||
__typeof__(y) _y = (y); \
|
||||
(void) (&_x == &_y); \
|
||||
_x > _y ? _x : _y; })
|
||||
|
||||
#define COLD __attribute__((cold))
|
||||
#define UNUSED __attribute__((unused))
|
||||
#define EXPORT __attribute__((visibility("default")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue