delay allocating slab metadata from reservation

This commit is contained in:
Daniel Micay 2018-10-18 15:19:54 -04:00
parent 74139112d0
commit fe30f6c2ea
2 changed files with 13 additions and 5 deletions

12
util.h
View file

@ -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")))