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

Function _get_pgls_head

components/mm/mm_page.c:497–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495}
496
497static rt_page_t *_get_pgls_head(pgls_agr_t *agr_pgls, int affid,
498 rt_uint32_t size_bits)
499{
500 rt_page_t *pgls_head;
501 int index;
502
503 if (size_bits < AFFID_BLK_BITS)
504 {
505 index = affid >> size_bits;
506 RT_ASSERT(index < AFFID_NUMOF_ID_IN_SET(size_bits));
507
508 RT_ASSERT(PGLS_IS_AFF_MAP(agr_pgls[size_bits]));
509 pgls_head = &PGLS_GET_AFF_MAP(agr_pgls[size_bits])[index];
510 }
511 else
512 {
513 RT_ASSERT(!PGLS_IS_AFF_MAP(agr_pgls[size_bits]));
514 pgls_head = &agr_pgls[size_bits].page_list;
515 }
516
517 return pgls_head;
518}
519
520static void _page_alloc(struct rt_page *p)
521{

Callers 1

__pages_allocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected