MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_page_alloc

Function rt_page_alloc

src/kservice.c:974–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

972
973#if defined(RT_USING_SLAB) && defined(RT_USING_SLAB_AS_HEAP)
974void *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
988void rt_page_free(void *addr, rt_size_t npages)
989{

Callers

nothing calls this directly

Calls 3

_heap_lockFunction · 0.85
rt_slab_page_allocFunction · 0.85
_heap_unlockFunction · 0.85

Tested by

no test coverage detected