Project: AspectJ
Bug 348979 world type map fixed/expendable problems
Reported: 2011-06-09 18:59:37 | Status: resolved fixed

Discovered whilst working with Steve Ash on a build of a few projects that was consuming more than 2Gigs of heap. To recover memory Steve activated type demotion. This didn't appear to help much. This was due to Steve's projects using aspectpath. The aspectpath scanning to discover aspects was inadvertently making any types discovered on the aspectpath permanent types (not expendable) and they'd never be demoted/evicted. The types were all being made permanent in case they were an aspect but never being demoted if it turns out they were not. In a Roo petclinic I added spel as a dependency (on the aspectpath) and parsed a simple expression (just to further exaggerate the problem). This was leaving 213 types in the fixed area of the typemap. By correctly scanning aspectpath and demoting non-aspects this was reduced to 90.

Files changed in fix:
tests/multiIncremental/PR278496_10/base/com/Asp.java tests/multiIncremental/PR278496_10/base/com/Foo.java tests/multiIncremental/PR278496_11/base/com/Foo.java tests/multiIncremental/PR278496_11_a/base/com/Asp.java tests/multiIncremental/PR278496_11_a/base/com/Dibble.java