Patent ID: 8930661
Filing Date: 2015-01-06
Classification: G06F

Abstract:
1. A method of detecting a memory leak of an operation processing device having a processor and a memory using the processor, the method comprising: producing an object which occupies a first area of the memory; running a garbage collection process to check an existence of a pointer which points at the object repeatedly, the garbage collection process includes deleting the object when the pointer does not exist and increasing a counter value when the pointer exists; allowing access to a second area of the memory by setting an access protection for reading and writing operations and moving the object from the first area to the second area when a counter value which indicates a number of running times of the garbage collection process exceeds a first threshold; detecting an illegal access to the second area based on the access protection and determining the object occupying the second area as impossibly causing the memory leak when the object occupying the second area is to be accessed; allowing access to the second area based on the access protection, storing an address of the object to the memory, moving the object as impossibly causing the memory leak from the second area to the first area and clearing the counter value of the object when the object occupying the second area is to be accessed; and determining the object occupying the second area as possibly causing the memory leak and outputting the object possibly causing the memory leak when the counter value exceeds a second threshold, the second threshold being a sum of the first threshold and a fixed value.