mem: add mmap helper

Add function and structure to help with mmap and mlock
This commit is contained in:
Wim Taymans 2017-12-01 12:40:32 +01:00
parent 3a9070ee10
commit ccd19f1e49
2 changed files with 21 additions and 1 deletions

View file

@ -118,7 +118,8 @@ struct spa_fraction {
#define SPA_DEPRECATED
#endif
#define SPA_ROUND_UP_N(num,align) ((((num) + ((align) - 1)) & ~((align) - 1)))
#define SPA_ROUND_DOWN_N(num,align) ((num) & ~((align) - 1))
#define SPA_ROUND_UP_N(num,align) SPA_ROUND_DOWN_N((num) + ((align) - 1),align)
#ifndef SPA_LIKELY
#ifdef __GNUC__