Is there a way to set a time limit on the GC?
I'm asking because I'm writing a game which allocates some floats, ints and longs on each event, and I'd rather call the GC for a short period of time (5-20ms) to remove those. I'd then call the GC in each Game Loop. This way would be my personal favourite as I still have some allocations which I can't backtrace without a lot of effort (I've already removed most stuff).
Alternatively I'd look for the other allocations and prevent them somehow, but then I'd need a way to prevent allocations in events.
Here's the result of allocation tracker if needed: http://textsave.de/?p=67220
EDIT: I can't really find anything with the allocation tracker, all the objects are from some far off java-internal class (even in the trace). Also, the shown objects are nowhere near the numbers being collected (unless the garbage collector counts float[] as multiple objects).
Anybody have this problem?