On 29 Okt., 19:37, Malcolm Sharpe <[EMAIL PROTECTED]> wrote:
> Hi,
>
> We've encountered an interesting Java memory usage problem that occurs
> when using lazily-constructed data structures. The problem is that a
> single data structure, such as a list, may not fit into memory all at
> once, so it's important to not hold a reference to the parts that are
> no longer in use. Unfortunately, Sun's Java GC follows local variables
> even when they can be statically known to be no longer in use, such as
> after they are passed to a function call and never again referenced.
> This only seems to be the case with the bytecode interpreter, but an
> out-of-memory error can occur well before the affected code is JIT-
> compiled.
>
> This issue is most common in lazy languages implemented on the JVM,
> such as our language, CAL, but it affects any JVM program using lazy
> data structures.

Right.
This is also a problem brought about by the inability of the JVM to do
tail calls. Proper tail calls would null out the local variables of
the caller automatically, instantly and cheaply.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to