* circular dependency on allocating memory and writing it into VM's
* page table.
*/
+#if SANITYCHECKS
+#define SPAREPAGES 100
+#define STATIC_SPAREPAGES 90
+#else
#define SPAREPAGES 15
+#define STATIC_SPAREPAGES 10
+#endif
int missing_spares = SPAREPAGES;
static struct {
void *page;
phys_bytes page_directories_phys;
u32_t *page_directories = NULL;
-#define STATIC_SPAREPAGES 10
-
-static char static_sparepages[I386_PAGE_SIZE*STATIC_SPAREPAGES + I386_PAGE_SIZE] __aligned(I386_PAGE_SIZE);
+static char static_sparepages[I386_PAGE_SIZE*STATIC_SPAREPAGES]
+ __aligned(I386_PAGE_SIZE);
#if SANITYCHECKS
/*===========================================================================*
/* Inform kernel vm has a newly built page table. */
assert(vmproc[VM_PROC_NR].vm_endpoint == VM_PROC_NR);
- pt_mapkernel(newpt);
pt_bind(newpt, &vmproc[VM_PROC_NR]);
/* All OK. */
#if SANITYCHECKS
env_parse("vm_sanitychecklevel", "d", 0, &vm_sanitychecklevel, 0, SCL_MAX);
-
- vm_sanitychecklevel = 1;
#endif
/* Get chunks of available memory. */
if(pr->ph->refcount != pr->ph->seencount) {
map_printmap(vmp);
printf("ph in vr %p: 0x%lx-0x%lx refcount %d "
- "but seencount %lu\n",
+ "but seencount %u\n",
vr, pr->offset,
pr->offset + pr->ph->length,
pr->ph->refcount, pr->ph->seencount);