Summary
In computer programming, resource management refers to techniques for managing resources (components with limited availability). Computer programs may manage their own resources by using features exposed by programming languages ( is a survey article contrasting different approaches), or may elect to manage them by a host – an operating system or virtual machine – or another program. Host-based management is known as resource tracking, and consists of cleaning up resource leaks: terminating access to resources that have been acquired but not released after use. This is known as reclaiming resources, and is analogous to garbage collection for memory. On many systems, the operating system reclaims resources after the process makes the exit system call. The omission of releasing a resource when a program has finished using it is known as a resource leak, and is an issue in sequential computing. Multiple processes wish to access a limited resource can be an issue in concurrent computing, and is known as resource contention. Resource management seeks to control access in order to prevent both of these situations. resource leak Formally, resource management (preventing resource leaks) consists of ensuring that a resource is released if and only if it is successfully acquired. This general problem can be abstracted as "before, body, and after" code, which normally are executed in this order, with the condition that the after code is called if and only if the before code successfully completes, regardless of whether the body code executes successfully or not. This is also known as execute around or a code sandwich, and occurs in various other contexts, such as a temporary change of program state, or tracing entry and exit into a subroutine. However, resource management is the most commonly cited application. In aspect-oriented programming, such execute around logic is a form of advice. In the terminology of control flow analysis, resource release must postdominate successful resource acquisition; failure to ensure this is a bug, and a code path that violates this condition causes a resource leak.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.