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

Function _null_page_fault

components/lwp/lwp_user_mm.c:52–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static void _null_page_fault(struct rt_varea *varea,
53 struct rt_aspace_fault_msg *msg)
54{
55 static void *null_page;
56
57 if (!null_page)
58 {
59 null_page = rt_pages_alloc_ext(0, PAGE_ANY_AVAILABLE);
60 if (null_page)
61 memset(null_page, 0, ARCH_PAGE_SIZE);
62 else
63 return;
64 }
65
66 msg->response.status = MM_FAULT_STATUS_OK;
67 msg->response.size = ARCH_PAGE_SIZE;
68 msg->response.vaddr = null_page;
69}
70
71static rt_err_t _null_shrink(rt_varea_t varea, void *new_start, rt_size_t size)
72{

Callers

nothing calls this directly

Calls 1

rt_pages_alloc_extFunction · 0.85

Tested by

no test coverage detected