Optimizing system memory usage
AssigneeInternational Business Machines Corporation
InventorsAsha Kiran Bondalakunta, Raghavan Devanathan, Muthulakshmi Pearl Srinivasan
Life of this patent
Estimating the term…
Abstract
A computer determines whether a page boundary of a page has been crossed by a function. Based on the computer determining that the page boundary has been crossed by the function, the computer generates a hardware exception. The computer resets one or more of a change bit and a reference bit for the page.
Claims12
A method for optimizing usage of system memory, comprising the steps of:
- determining, by a computer, whether a page boundary of a first page has been crossed by a function, wherein the determining whether the first page boundary of a page has been crossed by the function comprises determining whether the function is executing an instruction that involves at least one of:
- referencing a second page, and writing to a second page, wherein the reference bit, when set, indicates that the first page has been referenced;
- and wherein the change bit, when set, indicates that the first page has been written to;
- based on the determining that the page boundary has been crossed by the function, generating, by the computer, a hardware exception, wherein the generating the hardware exception comprises transferring, by the computer, control of execution to an exception handler;
- and
- based on the computer generating the hardware exception, resetting, by the computer, one or more of the change bit and the reference bit for the first page, wherein resetting the change bit and the reference bit prevents the first page from being swapped out of the system memory.
A computer program product for optimizing usage of system memory, the computer program product comprising:
- one or more computer-readable storage devices and program instructions stored on at least one of the one or more computer-readable storage devices, the program instructions comprising:
- program instructions to determine whether a page boundary of a first page has been crossed by a function, wherein the program instructions to determine whether the first page boundary of a page has been crossed by the function comprises program instructions to determine whether the function is executing an instruction that involves at least one of:
- referencing a second page, and writing to a second page, wherein the reference bit, when set, indicates that the first page has been referenced, and wherein the change bit, when set, indicates that the first page has been written to;
- based on determining that the first page boundary has been crossed by the function, program instructions to generate a hardware exception, wherein the program instructions to generate the hardware exception comprise transferring control of execution to an exception handler;
- and
- based on generating the hardware exception, program instructions to reset one or more of the change bit and the reference bit for the first page, wherein resetting the change bit and the reference bit prevents the first page from being swapped out of the system memory.
A computer system for optimizing usage of system memory, the computer system comprising:
- one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage devices, and program instructions stored on at least one of the one or more computer-readable tangible storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, the program instructions comprising:
- program instructions to determine whether a page boundary of a first page has been crossed by a function, wherein the program instruction to determine whether the first page boundary of a page has been crossed by the function comprises program instructions to determine whether the function is executing an instruction that involves at least one of:
- referencing a second page, and writing to a second page, wherein the reference bit, when set, indicates that the first page has been referenced, and wherein the change bit, when set, indicates that the first page has been written to;
- based on determining that the first page boundary has been crossed by the function, program instructions to generate a hardware exception, wherein the program instructions to generate the hardware exception comprise transferring control of execution to an exception handler;
- and
- based on generating the hardware exception, program instructions to reset one or more of the change bit and the reference bit for the first page, wherein resetting the change bit and the reference bit prevents the first page from being swapped out of the system memory.
Dependencies are inferred from the claim text.