Lines Matching refs:heap
39 #define init_heap(heap, _size, gfp) \ argument
42 (heap)->used = 0; \
43 (heap)->size = (_size); \
44 _bytes = (heap)->size * sizeof(*(heap)->data); \
45 (heap)->data = NULL; \
47 (heap)->data = kmalloc(_bytes, (gfp)); \
48 if ((!(heap)->data) && ((gfp) & GFP_KERNEL)) \
49 (heap)->data = vmalloc(_bytes); \
50 (heap)->data; \
53 #define free_heap(heap) \ argument
55 if (is_vmalloc_addr((heap)->data)) \
56 vfree((heap)->data); \
58 kfree((heap)->data); \
59 (heap)->data = NULL; \