Indeed, that I did. I ran it through jvisualvm and it's definitely growing objects. It's odd though, because I don't see any reason why any of the namespaces I'm reloading would do that. It's not any one namespace, but all of them together. That's why I was thinking that it may have possibly been some implicit weirdness with reload.
On Sep 2, 8:29 pm, Chouser <chou...@gmail.com> wrote: > On Thu, Sep 2, 2010 at 7:47 PM, Rayne <disciplera...@gmail.com> wrote: > > I've got a curious little bit of a memory leak of sorts that I'm > > trying to narrow down. > > > I have an application (betcha can guess what it is if you know me from > > IRC :>) that, in order to reload plugins, requires each of them with > > the :reload option whenever you ask them to be reloaded. > > > Each of these plugins calls a macro that defines a set of defmethods > > for a multimethod in a namespace that never does get reloaded. They > > also define a single function that isn't a method. > > > Whenever these 'plugins' are reloaded (there are about 20 of them), > > the memory my application uses is raised by about 3MB, as monitored > > with htop. It's very consistent and always raises 2-3MB each time. The > > less plugins being reloaded, the less dramatic the memory jump. > > > Now, my question is: can require with :reload a lot of namespaces like > > this cause this sort of thing to happen? I mostly just need to know > > whether or not I'm going in the wrong direction. I've never had this > > sort of problem before. > > > If so, are there any steps I can take to keep memory from building up > > like this? > > I'd recommend using a memory profiling tool that lists the object > counts by class. I think jvisualvm that comes with Sun's JDK > will do it, and I know yourkit will. Check your counts before > a :reload and again after -- might give a good clue as to what's > going on. > > --Chouserhttp://joyofclojure.com/ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en