<- People Behind Informatics


All 0-9 A B C D E F G H I J K L M N O P Q R S T U V W XY Z




 
Automatic Memory-management and garbage collection
Many programming languages provide a feature to allocate memory at run-time, on demand. In contrast to semi-dynamic storage – as used to implement recursive procedure calls – which can be managed by the run time system fully automatically, allocation of dynamic memory is under the control of the programmer. Some programming languages also place de-allocation under the programmer’s control. This is, however, a dangerous issue. First, if the programmer forgets to de-allocate certain portions of the memory then long-living programs sooner or later run out of memory. Still worse, if the program de-allocates a piece of memory that is still in use by another part of the program then arbitrary ill behavior of the program arises. Therefore, it is better to handle de-allocation automatically with the help of a so-called garbage collector. At certain points of program execution (typically when memory is getting short) the garbage collector becomes active and checks whether previously allocated dynamic memory is still in use. Memory pieces without any program variable pointing to them can be de-allocated automatically. Garbage collection is hard to implement efficiently. First, the garbage collector must be very careful with memory usage, as it is supposed to manage the memory and not to consume it. Naïve recursive implementations with principally unlimited memory requirements are excluded. A second difficulty is time. Garbage collection may block normal program execution for a longer time. This cannot be tolerated by time sensitive, real time applications. This problem can be solved by so-called incremental garbage collection. Instead of de-allocating all unused memory, the incremental garbage collector frees periodically only as much memory as can be freed without considerable time consumption. [Source: Laszlo Böszörmenyi: Notes to the Virtual Exhibition "People behind Informatics"]
 

 

<- People Behind Informatics


Home  |  Top  |  Search  |  Gallery  | Glossary  | Sitemap  |  Making Of  |  Help