| Article: |
Modern Memory Management, Part 2 | |
| Subject: | Garbage collection | |
| Date: | 2005-12-09 11:22:44 | |
| From: | Gerd_Stolpmann | |
|
The author says about garbage collection that it works only for "true leaks" which are blocks to which no pointer points to. Although there are some GC mechanisms for which this is true (namely reference counting), others are better. In particular, a truly modern GC (using the mark-and-sweep or stop-and-copy mechanisms or both) also finds blocks that cannot be reached by any reference path starting at a registered root (a global variable). In such memory management systems, it is very hard to produce memory leaks. Unfortunately, the LAMP languages are not that modern.
|
||
Showing messages 1 through 1 of 1.
-
Garbage collection
2005-12-09 14:24:07 finesse [View]



I think the more important point I was trying to make, however, is that regardless of how good it may get, GC is still no replacement for brains :)