IP Library › Granted Patent US 12,493,412
Granted Patent B1
US 12,493,412 · App. 18/737,737 · Granted Dec 9, 2025

Optimizing memory usage in physical memory

Inventors: Vijay Sundaresan (North York, CA); Marius Pirvu (Toronto, CA); Gita Koblents (Toronto, CA)
Assignee: International Business Machines Corporation
G06F3/0613G06F3/0638G06F3/0673
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,493,412
App. No.
18/737,737
Granted
Dec 9, 2025
Kind
B1
Abstract

A computer-implemented method for optimizing memory usage. A processor set classifies data stored in virtual memory into hot data and cold data based on frequency of access for the data stored in the virtual memory. The processor set segregates the hot data and the cold data into different memory regions in the virtual memory to generate hot memory regions comprising the hot data and cold memory regions comprising the cold data. The processor set maps the hot memory regions to large physical pages in memory pages of physical memory and the cold memory regions to small physical pages in the memory pages. The processor set disclaims data in the cold memory regions from the memory pages of physical memory to reduce memory space used in the physical memory.

Claims (58)

1 . A computer implemented method for optimizing memory usage, the computer implemented method comprising:

classifying, by a processor set, data stored in virtual memory into hot data and cold data based on frequency of access for the data stored in the virtual memory, wherein metadata from the data are classified into the cold data when compiled codes associated with the metadata are already classified into the cold data, and wherein the compiled codes associated with the metadata comprise unresolved references associated with codes that did not run before the compilation;

segregating, by the processor set, the hot data and the cold data into different memory regions in the virtual memory to generate hot memory regions comprising the hot data and cold memory regions comprising the cold data;

mapping, by the processor set, the hot memory regions to large physical pages in memory pages of physical memory and the cold memory regions to small physical pages in the memory pages of the physical memory; and

disclaiming, by the processor set, data in the cold memory regions from the memory pages of the physical memory to reduce memory space used in the physical memory.

2 . The computer implemented method of claim 1 , wherein classifying, by the processor set, the data stored in the virtual memory into the hot data and the cold data based on the frequency of access for the data stored in the virtual memory comprises:

estimating, by the processor set, the frequency of access for the data stored in the virtual memory;

determining, by the processor set, whether the frequency of access for the data stored in the virtual memory exceeds a predefined threshold;

in response to determining that the frequency of access for the data stored in the virtual memory exceeds the predefined threshold, classifying, by the processor set, the data stored in the virtual memory into the hot data; and

in response to determining that the frequency of access for the data stored in the virtual memory does not exceed the predefined threshold, classifying, by the processor set, the data stored in the virtual memory into the cold data.

3 . The computer implemented method of claim 1 , wherein disclaiming, by the processor set, the data in the cold memory regions from the memory pages of physical memory to reduce the memory space used in the physical memory comprises:

disclaiming, by the processor set, the memory pages backing the data in the cold memory regions after an application accessing data in the cold memory regions experiences a phase change.

4 . The computer implemented method of claim 1 , wherein disclaiming, by the processor set, the data in the cold memory regions from the memory pages of physical memory to reduce the memory space used in the physical memory comprises:

disclaiming, by the processor set, the memory pages backing data in a cold memory region after the cold memory region becomes full.

5 . The computer implemented method of claim 1 , wherein disclaiming, by the processor set, the data in the cold memory regions from the memory pages of physical memory to reduce the memory space used in the physical memory comprises:

disclaiming, by the processor set, the memory pages backing the data in the cold memory regions periodically in a predetermined time interval.

6 . The computer implemented method of claim 1 , wherein the compiled codes are associated with slow paths for speculative optimization generated by a compiler.

7 . The computer implemented method of claim 1 , wherein basic blocks of the compiled codes are dominated or post dominated by other basic blocks that are classified into the cold data.

8 . A computer system comprising:

a processor set;

a set of one or more computer-readable storage media; and

program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations:

classify data stored in virtual memory into hot data and cold data based on frequency of access for the data stored in the virtual memory, wherein metadata from the data are classified into the cold data when compiled codes associated with the metadata are already classified into the cold data, and wherein the compiled codes associated with the metadata comprise unresolved references associated with codes that did not run before the compilation;

segregate the hot data and the cold data into different memory regions in the virtual memory to generate hot memory regions comprising the hot data and cold memory regions comprising the cold data;

map the hot memory regions to large physical pages in memory pages of physical memory and the cold memory regions to small physical pages in the memory pages of the physical memory; and

disclaim data in the cold memory regions from the memory pages of the physical memory to reduce memory space used in the physical memory.

9 . The computer system of claim 8 , wherein as part of classifying the data stored in the virtual memory into the hot data and the cold data based on the frequency of access for the data stored in the virtual memory, the program instructions, collectively stored in the set of one or more storage media, cause the processor set to perform the following computer operations:

estimate the frequency of access for the data stored in the virtual memory;

determine whether the frequency of access for the data stored in the virtual memory exceeds a predefined threshold;

in response to determining that the frequency of access for the data stored in the virtual memory exceeds the predefined threshold, classify the data stored in the virtual memory into the hot data; and

in response to determining that the frequency of access for the data stored in the virtual memory does not exceed the predefined threshold, classify the data stored in the virtual memory into the cold data.

10 . The computer system of claim 8 , wherein as part of disclaiming the data in the cold memory regions from the memory pages of the physical memory to reduce the memory space used in the physical memory, the program instructions, collectively stored in the set of one or more storage media, cause the processor set to perform the following computer operations:

disclaim the memory pages backing the data in the cold memory regions after an application accessing the data in the cold memory regions experiences a phase change.

11 . The computer system of claim 8 , wherein as part of disclaiming the data in the cold memory regions from the memory pages of the physical memory to reduce the memory space used in the physical memory, the program instructions, collectively stored in the set of one or more storage media, cause the processor set to perform the following computer operations:

disclaim the memory pages backing data in a cold memory region after the cold memory region becomes full.

12 . The computer system of claim 8 , wherein as part of disclaiming the data in the cold memory regions from the memory pages of the physical memory to reduce the memory space used in the physical memory, the program instructions, collectively stored in the set of one or more storage media, cause the processor set to perform the following computer operations:

disclaim the memory pages backing the data in the cold memory regions periodically in a predetermined time interval.

13 . The computer system of claim 8 , wherein the compiled codes are associated with slow paths for speculative optimization generated by a compiler.

14 . The computer system of claim 8 , wherein basic blocks of the compiled codes are dominated or post dominated by other basic blocks that are classified into the cold data.

15 . A computer program product for optimizing memory usage, the computer program product comprising:

a set of one or more computer-readable storage media;

program instructions, collectively stored in the set of one or more storage media, cause a processor set to perform the following computer operations:

classify data stored in virtual memory into hot data and cold data based on frequency of access for the data stored in the virtual memory, wherein metadata from the data are classified into the cold data when compiled codes associated with the metadata are already classified into the cold data, and wherein the compiled codes associated with the metadata comprise unresolved references associated with codes that did not run before the compilation;

segregate the hot data and the cold data into different memory regions in the virtual memory to generate hot memory regions comprising the hot data and cold memory regions comprising the cold data;

map the hot memory regions to large physical pages in memory pages of physical memory and the cold memory regions to small physical pages in the memory pages of the physical memory; and

disclaim data in the cold memory regions from the memory pages of the physical memory to reduce memory space used in the physical memory.

16 . The computer program product of claim 15 , wherein as part of classifying the data stored in the virtual memory into the hot data and the cold data based on the frequency of access for the data stored in the virtual memory, the operation performed by the processor set comprises:

estimate the frequency of access for the data stored in the virtual memory;

determine whether the frequency of access for the data stored in the virtual memory exceeds a predefined threshold;

in response to determining that the frequency of access for the data stored in the virtual memory exceeds the predefined threshold, classify the data stored in the virtual memory into the hot data; and

in response to determining that the frequency of access for the data stored in the virtual memory does not exceed the predefined threshold, classify the data stored in the virtual memory into the cold data.

17 . The computer program product of claim 15 , wherein as part of disclaiming the data in the cold memory regions from the memory pages of the physical memory to reduce the memory space used in the physical memory, the operation performed by the processor set comprises:

disclaim the memory pages containing the data in the cold memory regions after an application accessing the data in the cold memory regions experiences a phase change.

18 . The computer program product of claim 15 , wherein as part of disclaiming the data in the cold memory regions from the memory pages of the physical memory to reduce the memory space used in the physical memory, the operation performed by the processor set comprises:

disclaim the memory pages backing data in a cold memory region after the cold memory region becomes full.

19 . The computer program product of claim 15 , wherein as part of disclaiming the data in the cold memory regions from the memory pages of the physical memory to reduce the memory space used in the physical memory, the operation performed by the processor set comprises:

disclaim the memory pages backing the data in the cold memory regions periodically in a predetermined time interval.

20 . The computer program product of claim 15 , wherein the compiled codes are associated with slow paths for speculative optimization generated by a compiler.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 7, 2024
From: SUNDARESAN, VIJAY; PIRVU, MARIUS; KOBLENTS, GITA
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 067660/0299 →
References Cited (18)
US 9569612B2 · Wilkerson et al. · 2017 [cited by applicant]
US 9935975B2 · Wilkerson et al. · 2018 [cited by applicant]
US 10642505B1 · Kuzmin et al. · 2020 [cited by applicant]
US 20040268350A1 · Welland · 2004 [cited by examiner]
US 20150363326A1 · Baskakov · 2015 [cited by examiner]
US 20150378628A1 · Golander · 2015 [cited by examiner]
US 20160034195A1 · Li · 2016 [cited by examiner]
US 20180024923A1 · Hassan · 2018 [cited by examiner]
US 20200142825A1 · Barczak · 2020 [cited by examiner]
US 20230376423A1 · Li · 2023 [cited by examiner]
US 20240330187A1 · Xiang · 2024 [cited by examiner]
Al Maruf et al., “TPP: Transparent Page Placement for CXL-Enabled Tiered-Memory,” Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, 2023, pp. … [cited by applicant]
Anonymous, “Employing Statistical Confidence Interval Estimation for DecisionMaking in Feedback Directed Optimization,” ip.com Prior Art Database, Oct. 31, 2018, 9 pages, ip.com, accessed May 13, 2024, https://priorart.… [cited by applicant]
Anonymous, “Method and Apparatus for Dynamic Distribution of Data among Heterogeneous Memory Units,” ip.com Prior Art Database, Jun. 1, 2010, 2 pages, ip.com, accessed May 13, 2024, https://priorart.ip.com/IPCOM/0001963… [cited by applicant]
Anonymous, “Methods and Techniques for Improving Endurance performanceof DRAM-Like Persistent Memory using Multiple Bank-DensityArchitectures.,” ip.com Prior Art Database, Sep. 20, 2021, 5 pages, ip.com, accessed May 13… [cited by applicant]
Anonymous, “OS Memory Management Framework to Compute Large-PageUtilization Using Hardware Assist,” ip.com Prior Art Database, May 22, 2023, 9 pages, ip.com, accessed May 13, 2024, https://priorart.ip.com/IPCOM/00027232… [cited by applicant]
Bergman et al., “Reconsidering OS Memory Optimizations in the Presence of Disaggregated Memory,” Proceedings of the 2022 ACM SIGPLAN International Symposium on Memory Management (ISMM 2022), Jun. 14, 2022, 14 pages, acm… [cited by applicant]
Bergner et al., “Performance Optimization and Tuning Techniques for IBM Power Systems Processors Including IBM POWER8,” Aug. 2015, 274 pages, IBM Redbooks, accessed May 13, 2024, https://www.redbooks.ibm.com/abstracts/s… [cited by applicant]