Virtual memory allocation in a virtual address space having an inaccessible gap
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.
4 Assignments
0 Petitions
Accused Products
Abstract
A new virtual memory system is disclosed having a virtual address space including a gap of inaccessible virtual addresses within the virtual address space. A new virtual memory allocation routine is disclosed providing a starting address of accessible virtual addresses allocated to a currently executing process in a response to a request. The accessible virtual addresses are virtually contiguous, and include no addresses from within the gap of inaccessible virtual addresses. A new virtual memory deallocation routine is further disclosed providing deallocation of ranges of virtual addresses which may or may not include addresses within the inaccessible gap.
-
Citations
14 Claims
-
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 Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. 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, 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 truncated difference equal to said difference having bits n through m-1 set to zero, and for determining a number of page table entries to remove equal to said truncated difference divided by a predetermined page size; and means, within said virtual memory deallocation routine, for removing said number of page table entries to remove from a page table structure. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
Specification