×

Virtual memory allocation in a virtual address space having an inaccessible gap

  • US 5,978,892 A
  • Filed: 05/03/1996
  • Issued: 11/02/1999
  • Est. Priority Date: 05/03/1996
  • Status: Expired due to Term
First Claim
Patent Images

1. A virtual memory system, comprising:

  • a virtual address space including virtual addresses between a lowest virtual address and a highest virtual address;

    a virtual address format having a length of m bits, where bits 0 through n-1 of said m bits map said virtual address to a physical address, and where bits n through m-1 contain all zeros or all ones to match the value of bit n-1;

    a gap of inaccessible virtual addresses, within said virtual address space, located equidistant from said highest virtual address and said lowest virtual address, and having a size equal to 2m -2n ;

    a virtual memory deallocation routine, responsive to a request for deallocation of virtual addresses by a currently executing process, said request including a byte length and a starting virtual address, for deallocating an amount of virtual memory equal to said byte length beginning at said starting virtual address;

    means, within said virtual memory deallocation routine, for determining an end virtual address of said request equal to a sum of said starting virtual address plus said byte length minus a predetermined page size, and for sign-extending said end virtual address such that bits n through (m-1) of said end virtual address are equal to the value of bit (n-1) of said end address;

    means, within said virtual memory deallocation routine, for determining a truncated end virtual address equal to said end virtual address having bits n through m-1 set to zero;

    means, within said virtual memory deallocation routine, for determining a difference between said truncated end virtual address and said starting virtual address, and for determining a number of page table entries to remove equal to said difference divided by a predetermined page size, plus one; and

    means, within said virtual memory deallocation routine, for removing said number of page table entries to remove from a page table structure.

View all claims
  • 4 Assignments
Timeline View
Assignment View
    ×
    ×