diff --git a/servers/vm/alloc.c b/servers/vm/alloc.c index 5d9e6e497..5dbcbaa27 100644 --- a/servers/vm/alloc.c +++ b/servers/vm/alloc.c @@ -376,8 +376,14 @@ struct memlist *alloc_mem_in_list(phys_bytes bytes, u32_t flags, phys_bytes know assert(!(flags & PAF_CONTIG)); - if(known != MAP_NONE) + if(known != MAP_NONE) { + if(known == NO_MEM) { + printf("VM: odd mem for alloc_mem_in_list: 0x%lx\n", + known); + return NULL; + } phys_count = known; + } do { struct memlist *ml; @@ -426,19 +432,6 @@ struct memlist *alloc_mem_in_list(phys_bytes bytes, u32_t flags, phys_bytes know rempages--; } while(rempages > 0); - { - struct memlist *ml; - for(ml = head; ml; ml = ml->next) { - assert(ml->phys); -#if NONCONTIGUOUS - if(!(flags & PAF_CONTIG)) { - if(ml->next) - assert(ml->phys + ml->length != ml->next->phys); - } -#endif - } - } - return head; } diff --git a/servers/vm/vm.h b/servers/vm/vm.h index 66287dc37..edf205c41 100644 --- a/servers/vm/vm.h +++ b/servers/vm/vm.h @@ -1,6 +1,4 @@ -#define NO_MEM ((phys_clicks) 0) /* returned by alloc_mem() with mem is up */ - /* Memory flags to pt_allocmap() and alloc_mem(). */ #define PAF_CLEAR 0x01 /* Clear physical memory. */ #define PAF_CONTIG 0x02 /* Physically contiguous. */ @@ -21,7 +19,6 @@ /* VM behaviour */ #define MEMPROTECT 0 /* Slab objects not mapped. Access with USE() */ #define JUNKFREE 0 /* Fill freed pages with junk */ -#define NONCONTIGUOUS 0 /* Make phys pages max. noncontiguous */ /* How noisy are we supposed to be? */ #define VERBOSE 0 @@ -51,4 +48,5 @@ #define WMF_VERIFY 0x08 /* Check pagetable contents. */ #define MAP_NONE 0xFFFFFFFE +#define NO_MEM ((phys_clicks) MAP_NONE) /* returned by alloc_mem() with mem is up */