Rob,

The JVM is pretty reasonable about garbage collecting classes as long as

a) you define them in ClassLoaders which you toss when you're through with
them
b) you manage to not create back-references to other ClassLoaders that would
keep them alive

In your example of a REPL, the best thing to do would be to load the user
code in its own ClassLoader, so you can turn around and dump it when you're
done. (There are other reasons why it makes sense to do this too).

We have not seen and do not anticipate any problems with running out of
permgen space. In the pathalogical case that your app does run a JVM out of
permspace, that JVM will be immediately retired from serving. Your app will
continue to serve out of other JVMs.

On Fri, Aug 28, 2009 at 4:25 PM, Rob <[email protected]> wrote:

>
> Hi,
>
> I've noticed these "permgen out of memory" errors when developing java
> web apps (not on App Engine, yet).  Usually they happen only while
> developing locally and "reloading" the app in the servlet container.
> But I've heard that they happen because the JVM has some issues with
> garbage collecting classes.  So I'm wondering if this could be a
> problem for a JVM language, for example, a Lisp, that does a lot of
> compiling and classloading at runtime.  An example use would be a web
> interface to a REPL where each expression is compiled to a bytecode
> for a new class (this simplifies the implementation -- no interpreter
> needed, just a compiler).  Could this blow up at some point because
> it's creating too many classes?
>
> I hoping that someone who knows more about the JVM, specifically the
> one behind App Engine, can clarify this for me.
>
> thanks,
> Rob
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to