Figure 348 Slab with external offslab slab header

Setting or reading this information is concealed behind the set_page_slab and get_page_slab, respectively, _cache functions to lower the hack value of this convention.

mm/slab.c void page_set_cache(struct page *page, struct kmem_cache *cache) struct kmem_cache *page_get_cache(struct page *page)

void page_set_slab(struct page *page, struct slab *slab) struct slab *page_get_slab(struct page *page)

Additionally, the kernel sets the page flag pg_slab for each physical page, that is allocated for the slab allocator.

Continue reading here: Implementation

Was this article helpful?

0 0