vm_assert((vmin % I386_PAGE_SIZE) == 0);
vm_assert((vmax % I386_PAGE_SIZE) == 0);
-#if SANITYCHECKS
+#if 1
curv = ((u32_t) random()) % ((vmax - vmin)/I386_PAGE_SIZE);
curv *= I386_PAGE_SIZE;
curv += vmin;
vm_assert(!(pt->pt_dir[pde] & I386_VM_PRESENT));
vm_assert(!pt->pt_pt[pde]);
-#if SANITYCHECKS
- printf("1");
-#endif
-
/* Get storage for the page table. */
if(!(pt->pt_pt[pde] = vm_allocpage(&pt_phys, VMP_PAGETABLE)))
return ENOMEM;
-#if SANITYCHECKS
- printf("2");
-#endif
for(i = 0; i < I386_VM_PT_ENTRIES; i++)
pt->pt_pt[pde][i] = 0; /* Empty entry. */
-#if SANITYCHECKS
- printf("3");
-#endif
/* Make page directory entry.
* The PDE is always 'present,' 'writable,' and 'user accessible,'
*/
pt->pt_dir[pde] = (pt_phys & I386_VM_ADDR_MASK) | flags
| I386_VM_PRESENT | I386_VM_USER | I386_VM_WRITE;
-#if SANITYCHECKS
- printf("4");
-#endif
- vm_assert(flags & I386_VM_PRESENT);
return OK;
}