previous | start | next

Final Remarks for using virtual_copy

 PUBLIC int virtual_copy(src_addr, dst_addr, bytes)
  struct vir_addr *src_addr;      /* source virtual address */
  struct vir_addr *dst_addr;      /* destination virtual address */
  vir_bytes bytes;                /* # of bytes to copy  */

After setting up the first two parameters, the last parameter to pass is the number of bytes to copy. In the example, this should be the size of the p_memmap array of mem_map structures. Since this array has 3 elements, this size should be the same as the sizeof(struct mem_map) multiplied by the number of local segments, NR_LOCAL_SEGS (3).



previous | start | next