+ // an anonymous page and not present
+ // -> a new page need to be alloc
+ if ((hit_region->attr & REGION_ANON)) {
+ if (!PG_IS_PRESENT(*pte)) {
+ cpu_invplg(pte);
+ uintptr_t pa = pmm_alloc_page(__current->pid, 0);
+ if (!pa) {
+ goto oom;
+ }
+
+ *pte = *pte | pa | PG_PRESENT;
+ memset(PG_ALIGN(ptr), 0, PG_SIZE);
+ goto resolved;
+ }
+ // permission denied on anon page (e.g., write on readonly page)