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

Function _buddy_get

components/mm/mm_page.c:462–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462static inline struct rt_page *_buddy_get(struct rt_page *p,
463 rt_uint32_t size_bits)
464{
465 rt_size_t addr;
466
467 RT_ASSERT(size_bits < RT_PAGE_MAX_ORDER - 1);
468
469 addr = (rt_size_t)rt_page_page2addr(p);
470 addr ^= (1UL << (size_bits + ARCH_PAGE_SHIFT));
471 return rt_page_addr2page((void *)addr);
472}
473
474static rt_page_t *_get_pgls_head_by_page(pgls_agr_t *agr_pgls, rt_page_t page,
475 rt_uint32_t size_bits)

Callers 2

_pages_freeFunction · 0.85
__pages_allocFunction · 0.85

Calls 2

rt_page_page2addrFunction · 0.85
rt_page_addr2pageFunction · 0.85

Tested by

no test coverage detected