October 2017
Intermediate to advanced
354 pages
9h 28m
English
With so many categories of modifier flags (each addressing different attributes), programmers exercise extreme care when choosing flags for corresponding allocations. To make the process easier and quicker, type flags were introduced, which enable programmers to make quick allocation choices. Type flags are derived from combinations of various modifier constants (listed previously) for specific allocation use cases. Programmers however can further customize type flags if required:
#define GFP_ATOMIC (__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM)#define GFP_KERNEL (__GFP_RECLAIM | __GFP_IO | __GFP_FS)#define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT)#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM)#define GFP_NOIO (__GFP_RECLAIM)
Read now
Unlock full access