public void unmap(int addr,int len){
  for (int i=0; i < len; i+=PAGE_SIZE) {
    int pte=getPTE(addr + i);
    if (getPage(pte) != null) {
      readableMemory[pte]=null;
      writableMemory[pte]=null;
      executableMemory[pte]=null;
    }
 else {
      throw new Error("Unmapping memory that's not mapped addr=0x" + Integer.toHexString(addr) + " len="+ len);
    }
  }
}

public void unmap ( int addr , int len ) { for ( int i = 0 ; i < len ; i += PAGE_SIZE ) { int pte = getPTE ( addr + i ) ; if ( getPage ( pte ) != null ) { readableMemory [ pte ] = null ; writableMemory [ pte ] = null ; executableMemory [ pte ] = null ; } else { throw new Error ( "Unmapping memory that's not mapped addr=0x" + Integer . toHexString ( addr ) + " len=" + len ) ; } } }
unmap a page of memory
