Hi, First, make sure you are on a recent AspectJ - you don't mention which version. As per http://www.eclipse.org/aspectj/doc/released/README-167.html (see the memory graphs in there) - you want to be on something later than 1.6.6, preferably 1.6.12.
Memory will spike at startup as 'stuff' is woven but over time it will reduce as many things are only held by weak/soft refs - how those end up being collected, well you are at the mercy of how your chosen JVM is going to treat them, so it may take a number of GCs before the memory is recovered. Right now the only types permanently held onto by the weaver (so not linked by weak/soft refs) are aspects and types affected by ITDs, are you doing ITDs or just advice? There is a work item to have a weaver go to 'sleep' on disk and reinflate when required, but I haven't gotten around to doing that work yet. cheers, Andy On 13 December 2011 21:51, Jayarajan, Divya <[email protected]> wrote: > Hi, > > I have written a .aj class for intercepting some methods of my > application.This works fine but I have observed that there is a large heap > memory consumption during the startup of the application after adding the > .aj class.If I remove the .aj class and restart the application, heap memory > consumption is normal (of-course I will not be able to execute intercepting > logic).I'm using loadtime weaving. > > I'm not able to figure out why there is so much memory needed at the > startup.Increasing the heap memory is not an option. > > Please suggest what can be done. > > Many Thanks, > Divya > > > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
