GC & The "Expensive Object" Problem
Bill Frantz
frantz@communities.com
Thu, 06 May 1999 11:43:23 -0700
At 12:55 AM 5/6/99 -0700, Mark S. Miller wrote:
>Normally, the delayed collection of gc vs refcounting isn't a problem, since
>the only extra cost is storage, and when we need more, we gc anyway.
>However, when the object is retaining some externally-expensive resource,
>the gc has no knowledge of this expense, and so optimizes the wrong thing
>out of ignorance.
[+] It is also necessary that exhaustion of the externally-expensive
resource trigger GC. A fine example is running out of OS file handles.
Current JVMs require that you close files if your application needs to
access a large number of files.