IP Library Granted Patent US 12,373,119
Granted Patent B2
US 12,373,119 · App. 18/071,052 · Granted Jul 29, 2025

Memory management method and semiconductor device adjusting size of contiguous memory allocation area

Inventor: Junghi Min (Suwon-si, KR)
Assignee: SAMSUNG ELECTRONICS CO., LTD.
G06F3/0631G06F3/0619G06F3/0679
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,373,119
App. No.
18/071,052
Granted
Jul 29, 2025
Kind
B2
Abstract

A memory management method is provided. The memory management method includes: allocating, by a processor, a partial area of a memory as a reserved area during booting; identifying, by the processor, a contiguous memory allocation (CMA) area in the reserved area based on a CMA request of a process, wherein the CMA request indicates a required size; adjusting, by the processor, a size of the CMA area based on the size of the CMA area and the required size; and allocating, by the processor, to the process, a portion of the memory in the adjusted CMA area corresponding to the required size.

Claims (53)

1. A memory management method comprising:

allocating, by a processor, a partial area of a memory as a reserved area during booting;

allocating another partial area of the memory as a normal area during booting;

identifying, by the processor, a contiguous memory allocation (CMA) area in the reserved area;

identifying, by the processor, a number of free pages in the CMA;

comparing the number of free pages in the CMA area with a first reference value;

comparing the number of free pages in the CMA area with a second reference value;

adjusting, by the processor, a size of the CMA area; and

allocating, by the processor, to a process, a portion of the memory in the adjusted CMA area corresponding to a required size indicated by a CMA request of the process,

wherein the adjusting the size of the CMA area comprises increasing the size of the CMA area based on the number of free pages in the CMA area being less than the first reference value and decreasing the CMA area based on the number of free pages in the CMA area being greater than the second reference value,

wherein the second reference value is greater than the first reference value, and

wherein the increasing the size of the CMA area comprises converting a movable block that is outside the CMA area to a CMA within the CMA area.

2. The memory management method of claim 1 , wherein the adjusting the size of the CMA area comprises:

identifying a size of a first area by subtracting the first reference value from the size of the identified CMA area; and

adjusting the size of the CMA area based on the required size being larger than the first area.

3. The memory management method of claim 2 , wherein the allocating the portion of the memory comprises providing a CMA failure signal to the process based on the required size being larger than the adjusted size of the CMA area.

4. The memory management method of claim 1 , wherein the adjusting the size of the CMA area comprises converting an area into the CMA area.

5. The memory management method of claim 4 , wherein the adjusting the size of the CMA area further comprises storing a position and size of the area to be converted into the CMA area.

6. The memory management method of claim 5 , wherein the adjusting the size of the CMA area further comprises converting the CMA area into another type of area.

7. The memory management method of claim 6 , wherein the adjusting the size of the CMA area further comprises:

identifying the CMA area, based on the position and size of the area to be converted into the CMA area; and

changing a type of the CMA area into another area.

8. A memory management method comprising:

identifying, by a processor, a number of free pages of a contiguous memory allocation (CMA) type within a CMA area in a memory;

comparing, by the processor, the number of free pages of the CMA type with a first reference number and a second reference number that is greater than the first reference number;

adjusting, by the processor, a size of the CMA area and the number of free pages of the CMA type based on a result of the comparing; and

allocating, by the processor, the adjusted number of free pages of the CMA type to a process based on a CMA request of the process,

wherein the adjusting the number of free pages of the CMA type comprises:

converting a movable block that is outside the CMA area to a CMA within the CMA area to increase the size of the CMA area and the number of free pages of the CMA type based on the number of free pages of the CMA type being less than the first reference number; and

decreasing the size of the CMA area and the number of free pages of the CMA type based on the number of free pages of the CMA type being greater than the second reference number.

9. The memory management method of claim 8 , wherein the identifying the number of free pages of the CMA type comprises obtaining bitmap information indicating whether a free page of the CMA type is allocated to the process.

10. The memory management method of claim 8 , wherein the increasing the size of the CMA area and the number of free pages of the CMA type comprises:

moving data stored in a first page that is a type other than the CMA type, to a second page; and

designating the first page as the CMA type.

11. The memory management method of claim 8 , wherein the allocating the adjusted number of free pages of the CMA type to the process comprises providing allocation failure information to the process when the adjusted number of free pages of the CMA type is less than a required number of free pages indicated by the CMA request.

12. A non-transitory computer-readable recording medium having recorded thereon a program for implementing a method including:

allocating a partial area of a memory as a reserved area during booting;

identifying a contiguous memory allocation (CMA) area in the reserved area;

identifying a number of free pages in the CMA;

comparing the number of free pages in the CMA area with a first reference value;

comparing the number of free pages in the CMA area with a second reference value;

adjusting a size of the CMA area; and

allocating, to a process, a portion of the memory in the adjusted CMA area corresponding to a required size indicated by a CMA request of the process,

wherein the adjusting the size of the CMA area comprises increasing the size of the CMA area based on the number of free pages in the CMA area being less than the first reference value and decreasing the CMA area based on the number of free pages in the CMA area being greater than the second reference value,

wherein the second reference value is greater than the first reference value, and

wherein the increasing the size of the CMA area comprises converting a movable block that is outside the CMA area to a CMA within the CMA area.

13. The non-transitory computer-readable recording medium of claim 12 , wherein the adjusting the size of the CMA area comprises:

identifying a size of a first area by subtracting the first reference value from the size of the identified CMA area; and

adjusting the size of the CMA area based on the required size being larger than the first area.

14. The non-transitory computer-readable recording medium of claim 12 , wherein the adjusting the size of the CMA area further comprises converting an area into the CMA area.

15. The non-transitory computer-readable recording medium of claim 13 , wherein the adjusting the size of the CMA area further comprises converting the CMA area into another type of area.

16. The memory management method of claim 1 , wherein the increasing the size of the CMA area is performed based on the number of free pages in the CMA area being less than the first reference value, and

wherein the decreasing the size of the CMA area is performed based on the number of free pages in the CMA area being greater than the second reference value.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 29, 2022
From: MIN, JUNGHI
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 061909/0596 →
Priority Claims (2)
KR 10-2021-0169496 · Nov 30, 2021 · national
KR 10-2022-0091314 · Jul 22, 2022 · national
Continuity (1)
Related Publication 20230168822A1 · Jun 1, 2023
References Cited (9)
US 6370633B2 · Sethi · 2002 [cited by applicant]
US 6968439B2 · Wong et al. · 2005 [cited by applicant]
US 7392363B2 · Fleming et al. · 2008 [cited by applicant]
US 7484070B1 · Walton et al. · 2009 [cited by applicant]
US 10019288B2 · Kung · 2018 [cited by examiner]
US 10409498B2 · Kim · 2019 [cited by examiner]
US 20100153678A1 · Kang et al. · 2010 [cited by applicant]
JP 2017162364A · 2017 [cited by applicant]
Park, et al., “GCMA: Guaranteed Contiguous Memory Allocator”, 2016, IEEE Transactions on Computers, 7 pages total. [cited by applicant]