Patent ID: 7225313

Claim:
A processor-implemented method for demoting a page in memory, comprising: in response to a request to demote a specified subpage of a base page that includes a plurality of subpages, wherein the base page is one size of a plurality of available page sizes, establishing a first new page from the subpage with a selected size of the plurality of sizes; storing a value indicating a size of the base page size in each subpage of the base page; and for each portion of the base page less the first new page, selecting as a first page size a largest of the plurality of page sizes that is less than or equal to the size of the portion; dividing the portion into one or more pages of the first page size and updating the value of the base page size in the one or more pages; and in response to a total size of the one or more pages being less than a size of the portion, repeating the steps of selecting and dividing using as the portion of the base page, a part of portion not encompassed by the one or more pages.