US 12,353,322 B2
Method and device for deallocating dynamically allocated memory area
Hyungon Moon, Ulsan (KR); Chanyoung Park, Ulsan (KR); Jaehyu Lee, Ulsan (KR); and Daeyeon Kim, Ulsan (KR)
Assigned to UNIST (Ulsan National Institute of Science and Technology), Ulsan (KR)
Filed by UNIST (Ulsan National Institute of Science and Technology), Ulsan (KR)
Filed on Nov. 29, 2023, as Appl. No. 18/522,403.
Claims priority of application No. 10-2022-0170530 (KR), filed on Dec. 8, 2022; and application No. 10-2023-0035857 (KR), filed on Mar. 20, 2023.
Prior Publication US 2024/0193079 A1, Jun. 13, 2024
Int. Cl. G06F 12/02 (2006.01); G06F 12/14 (2006.01)
CPC G06F 12/023 (2013.01) [G06F 12/1441 (2013.01); G06F 2212/1052 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method of deallocating a dynamically allocated memory area performed by a processor, the method comprising:
while the processor maintains user privilege, receiving a deallocation request for a dynamically allocated target memory area;
while the processor maintains kernel privilege, determining whether an other memory area comprising a code accessing the target memory area exists; and
while the processor maintains the user privilege, when the other memory area does not exist, deallocating the target memory area,
wherein the determining of whether the other memory area exists comprises:
when a dirty bit of a page table entry accessed with the kernel privilege has a first value, searching for a page corresponding to the page table entry; and
when the dirty bit of the page table entry accessed with the kernel privilege has a second value, skipping a search of the page corresponding to the page table entry,
wherein the searching of the page corresponding to the page table entry comprises:
when the search of the page is completed, changing the dirty bit of the page table entry from the first value to the second value.