| 972 | |
| 973 | #if defined(RT_USING_SLAB) && defined(RT_USING_SLAB_AS_HEAP) |
| 974 | void *rt_page_alloc(rt_size_t npages) |
| 975 | { |
| 976 | rt_base_t level; |
| 977 | void *ptr; |
| 978 | |
| 979 | /* Enter critical zone */ |
| 980 | level = _heap_lock(); |
| 981 | /* alloc page */ |
| 982 | ptr = rt_slab_page_alloc(system_heap, npages); |
| 983 | /* Exit critical zone */ |
| 984 | _heap_unlock(level); |
| 985 | return ptr; |
| 986 | } |
| 987 | |
| 988 | void rt_page_free(void *addr, rt_size_t npages) |
| 989 | { |
nothing calls this directly
no test coverage detected