摘要 |
A method for garbage collection in a portable terminal is provided to execute the garbage collection by using the real-time monitoring system of a daemon function having little influence on a system load, thereby optimizing the memory by always approximating a part which a dirty area occupies within a total memory block. A method for garbage collection in a portable terminal comprises the following steps of: monitoring the usage amount of at least one resource(S220); and executing the garbage collection if the amount used corresponds to a condition(S230~S250). The resource is a processor. The garbage collection is executed if the usage amount of the resource is less than a predetermined reference value. The resource is the memory. The garbage collection is executed if the usage amount of the resource is more than a predetermined reference value.
|