| CPC G06F 12/023 (2013.01) [G06F 12/1441 (2013.01); G06F 2212/1052 (2013.01)] | 17 Claims |

|
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.
|