A method and an apparatus that improves virtual memory management. The proposed
method and apparatus provides an application with an efficient channel for communicating
information about future behavior of an application with respect to the use of
memory and other resources to the OS, a paging daemon, and other system software.
The state of hint bits, which are integrated into page table entries and TLB entries
and are used for communicating information to the OS, can be changed explicitly
with a special instruction or implicitly as a result of referencing the associated
page. The latter is useful for canceling hints. The method and apparatus enables
memory allocators, garbage collectors, and compilers (such as those used by the
Java platform) to use a page-aligned heap and a page-aligned stack to assist the
OS in effective management of memory resources. This mechanism can also be used
in other system software.