US 12,373,119 B2
Memory management method and semiconductor device adjusting size of contiguous memory allocation area
Junghi Min, Suwon-si (KR)
Assigned to SAMSUNG ELECTRONICS CO., LTD., Suwon-si (KR)
Filed by SAMSUNG ELECTRONICS CO., LTD., Suwon-si (KR)
Filed on Nov. 29, 2022, as Appl. No. 18/071,052.
Claims priority of application No. 10-2021-0169496 (KR), filed on Nov. 30, 2021; and application No. 10-2022-0091314 (KR), filed on Jul. 22, 2022.
Prior Publication US 2023/0168822 A1, Jun. 1, 2023
Int. Cl. G06F 3/06 (2006.01)
CPC G06F 3/0631 (2013.01) [G06F 3/0619 (2013.01); G06F 3/0679 (2013.01)] 16 Claims
OG exemplary drawing
 
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.