From: Ben Gras Date: Tue, 18 Sep 2012 16:40:13 +0000 (+0200) Subject: VM: remove dead code X-Git-Tag: v3.2.1~320 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.rndc-confgen.html?a=commitdiff_plain;h=aa82e375c6c27147685e1e37efa0ad7a600fe600;p=minix.git VM: remove dead code --- diff --git a/servers/vm/proto.h b/servers/vm/proto.h index 968c7fda1..1c2b21638 100644 --- a/servers/vm/proto.h +++ b/servers/vm/proto.h @@ -35,8 +35,6 @@ void mem_init(struct memory *chunks); /* utility.c */ void get_mem_chunks(struct memory *mem_chunks); -void reserve_proc_mem(struct memory *mem_chunks, struct mem_map - *map_ptr); int vm_isokendpt(endpoint_t ep, int *proc); int get_stack_ptr(int proc_nr, vir_bytes *sp); int do_info(message *); diff --git a/servers/vm/utility.c b/servers/vm/utility.c index cbec6dc1a..06640d1aa 100644 --- a/servers/vm/utility.c +++ b/servers/vm/utility.c @@ -72,55 +72,6 @@ struct memory *mem_chunks; /* store mem chunks here */ } } -#if 0 -/*===========================================================================* - * reserve_proc_mem * - *===========================================================================*/ -void reserve_proc_mem(mem_chunks, map_ptr) -struct memory *mem_chunks; /* store mem chunks here */ -struct mem_map *map_ptr; /* memory to remove */ -{ -/* Remove server memory from the free memory list. - */ - struct memory *memp; - for (memp = mem_chunks; memp < &mem_chunks[NR_MEMS]; memp++) { - if(memp->base <= map_ptr[T].mem_phys - && memp->base+memp->size >= map_ptr[T].mem_phys) - { - phys_bytes progsz = map_ptr[S].mem_phys - - map_ptr[T].mem_phys; - phys_bytes progend = map_ptr[S].mem_phys; - - if (memp->base == map_ptr[T].mem_phys) { - memp->base += progsz; - memp->size -= progsz; - } else { - struct memory *mempr; - - /* have to split mem_chunks */ - if(mem_chunks[NR_MEMS-1].size>0) - panic("reserve_proc_mem: can't find free mem_chunks to map: 0x%lx", - map_ptr[T].mem_phys); - for(mempr=&mem_chunks[NR_MEMS-1];mempr>memp;mempr--) { - *mempr=*(mempr-1); - } - assert(memp < &mem_chunks[NR_MEMS-1]); - - (memp+1)->base = progend; - (memp+1)->size = memp->base + memp->size - - progend; - memp->size = map_ptr[T].mem_phys - memp->base; - } - break; - } - } - if (memp >= &mem_chunks[NR_MEMS]) { - panic("reserve_proc_mem: can't find map in mem_chunks: 0x%lx", - map_ptr[T].mem_phys); - } -} -#endif - /*===========================================================================* * vm_isokendpt * *===========================================================================*/