# US 2019/0171557 A1 · Memory management

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0171557 A1
- Document ID: US20190171557A1
- Status: Published application
- Kind: A1
- Application number: 15/828,727
- Filed: 2017-12-01
- Published: 2019-06-06
- Earliest claimed: 2017-12-01
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Michael P. Lyons; Andrew Hicks; Miles C. Pedrone; Yunli Tang; Tynan J. Garrett
- Web page: https://patentgrep.com/patent/US20190171557A1

## CPC

- G06F 12/023: {Free address space management}
- G06F 9/5016: {the resource being the memory}
- G06F 12/0638: {Combination of memories, e.g. ROM and RAM such as to permit replacement or supplementing of words in one module by words in another module (address formation of the next microinstruction G06F9/26; masking faults in memories by using spares or by reconfiguring G11C29/70)}
- G06F 12/0842: for multiprocessing or multitasking
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/657: Virtual address space management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Memory management in a computer system is described. Memory is allocated within page-aligned real memory storage to requesting processes. During a normal operation mode, pages of the real memory storage are allocated in accordance with a buddy allocation algorithm. A triggering condition is detected. Responsive to the detection, at least one contiguous page-sized or smaller memory segment that violates the buddy allocation algorithm is allocated to a requesting process.

## Claims

### Claim 1

A memory-management method comprising:
allocating memory within page-aligned real memory storage to requesting processes in contiguous page-sized or smaller memory segments, wherein, during a normal operation mode, pages of the real memory storage are allocated in accordance with a buddy allocation algorithm;
scanning, during the normal operation mode, the real memory storage for unallocated page-sized or smaller memory segments that cannot be allocated in accordance with the buddy allocation algorithm;
assigning the unallocated memory segments identified from the scan to at least one pool;
during the normal operation mode and responsive to an allocation of a portion of a particular unallocated memory segment in the at least one pool or a deallocation of a memory segment that is a paired buddy with the portion of the particular unallocated memory segment, removing at least the portion of that particular unallocated memory segment from the at least one pool;
detecting a triggering condition; and
responsive to the detection, allocating, to a requesting process, at least one contiguous page-sized or smaller memory segment that violates the buddy allocation algorithm, wherein the allocating, responsive to the detection, the at least one contiguous page-sized or smaller memory segment that violates the buddy allocation algorithm to the requesting process comprises:
responsive to the detection, allocating the unallocated memory segments in the at least one pool to requesting processes.

### Claim 2

(canceled)

### Claim 3 (depends on 1)

The method of claim 1, wherein the triggering condition comprises a lack of unallocated memory segments that are large enough to fulfill received memory requests without violating the buddy allocation algorithm.

### Claim 4 (depends on 1)

The method of claim 1, wherein the scanning and the assigning are performed by a system assist processor.

### Claim 5 (depends on 1)

The method of claim 1, wherein the at least one memory segment comprises two contiguous buddy memory segments, and wherein the at least one memory segment violates the buddy allocation algorithm by extending across a buddy system boundary.

### Claim 6

(canceled)

### Claim 7

(canceled)

### Claim 8

A computer program product for memory management, the computer program product comprising a computer readable storage medium, the computer readable storage medium having program instructions embodied therewith, the programs instructions configured, when executed by at least one computer, to cause the at least one computer to perform a method comprising:
allocating memory within page-aligned real memory storage to requesting processes in contiguous page-sized or smaller memory segments, wherein, during a normal operation mode, pages of the real memory storage are allocated in accordance with a buddy allocation algorithm;
scanning, during the normal operation mode, the real memory storage for unallocated page-sized or smaller memory segments that cannot be allocated in accordance with the buddy allocation algorithm;
assigning the unallocated memory segments identified from the scan to at least one pool;
during the normal operation mode and responsive to an allocation of a portion of a particular unallocated memory segment in the at least one pool or a deallocation of a memory segment that is a paired buddy with the portion of the particular unallocated memory segment, removing at least the portion of that particular unallocated memory segment from the at least one pool;
detecting a triggering condition; and
responsive to the detection, allocating, to a requesting process, at least one contiguous page-sized or smaller memory segment that violates the buddy allocation algorithm, wherein the allocating, responsive to the detection, the at least one contiguous page-sized or smaller memory segment that violates the buddy allocation algorithm to the requesting process comprises:
responsive to the detection, allocating the unallocated memory segments in the at least one pool to requesting processes.

### Claim 9

(canceled)

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the triggering condition comprises a lack of unallocated memory segments that are large enough to fulfill received memory requests without violating the buddy allocation algorithm.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the scanning and the assigning are performed by a system assist processor.

### Claim 12 (depends on 8)

The computer program product of claim 8, wherein the method further comprises:
responsive to the detection, defragging the real memory storage.

### Claim 13

(canceled)

### Claim 14

(canceled)

### Claim 15

A system for memory management, the system comprising:
a computer readable storage medium; and
a processor in communication with the computer readable storage medium, the processor configured to obtain instructions from the computer readable storage medium that cause the processor to perform a method comprising:
allocating memory within page-aligned real memory storage to requesting processes in contiguous page-sized or smaller memory segments, wherein, during a normal operation mode, pages of the real memory storage are allocated in accordance with a buddy allocation algorithm;
scanning, during the normal operation mode, the real memory storage for unallocated page-sized or smaller memory segments that cannot be allocated in accordance with the buddy allocation algorithm;
assigning the unallocated memory segments identified from the scan to at least one pool;
during the normal operation mode and responsive to an allocation of a portion of a particular unallocated memory segment in the at least one pool or a deallocation of a memory segment that is a paired buddy with the portion of the particular unallocated memory segment, removing at least the portion of that particular unallocated memory segment from the at least one pool;
detecting a triggering condition; and
responsive to the detection, allocating, to a requesting process, at least one contiguous page-sized or smaller memory segment that violates the buddy allocation algorithm, wherein the allocating, responsive to the detection, the at least one contiguous page-sized or smaller memory segment that violates the buddy allocation algorithm to the requesting process comprises:
responsive to the detection, allocating the unallocated memory segments in the at least one pool to requesting processes.

### Claim 16

(canceled)

### Claim 17 (depends on 15)

The system of claim 15, wherein the triggering condition comprises a lack of unallocated memory segments that are large enough to fulfill received memory requests without violating the buddy allocation algorithm.

### Claim 18 (depends on 15)

The system of claim 15, wherein the scanning and the assigning are performed by a system assist processor.

### Claim 19

(canceled)

### Claim 20

(canceled)
