]> Zhao Yanbai Git Server - minix.git/commitdiff
VM: remove dead code
authorBen Gras <ben@minix3.org>
Tue, 18 Sep 2012 16:40:13 +0000 (18:40 +0200)
committerBen Gras <ben@minix3.org>
Tue, 18 Sep 2012 16:40:57 +0000 (18:40 +0200)
servers/vm/proto.h
servers/vm/utility.c

index 968c7fda1d46301cb4a0edebea7148f48a397c96..1c2b216381c338a009255111502c8ca1e499b6ae 100644 (file)
@@ -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 *);
index cbec6dc1a4c02698cd5ffb885d7108d5cbb09053..06640d1aa1fee6d3a3afe739d4275d61f99edce7 100644 (file)
@@ -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                                        *
  *===========================================================================*/