<< Back to Codezero API Reference

10.) L4_KMEM_CONTROL

int l4_kmem_control(unsigned long pfn, int npages, int grant);
Purpose
Operational Model
/* A compact memory descriptor to determine used/unused physical pages in the system */
struct page_bitmap {
	unsigned long pfn_start;
	unsigned long pfn_end;
	unsigned int map[PHYSMEM_TOTAL_PAGES >> 5];
};
Example Usage
	/* Pager: Give the kernel some memory to use for its allocators */
	l4_kmem_control(__pfn(alloc_page(__pfn(SZ_1MB))), __pfn(SZ_1MB), 1);
L4 Userspace Library Functions

N/A

Future

In the future, this system call will be deprecated and replaced by an L4_CONTAINER_CONTROL system call that implements the same functionality in a generic and elegant way.

<< Back to Codezero API Reference