Hi,
I'd like to measure memory allocation data from my java application, i.e. the sum of the size of all objects that were allocated. Since object allocation is done in young generation this seems to be the right place.
I know jconsole and I know the JMX beans but I just can't find the right variable... Right at the moment we are parsing the gc log output file but that's quite hard. Ideally we'd like to measure it via JMX...
How can I get this value?
Additional info after comment of Chadwick:
I want to know how much memory my application is using. It's quite a big software running in a JBoss Appserver. Every 4 weeks there is a new release of the software and we need to compare the memory consumption between old and new version. It's not enough to compare the current value of the old generation at a specific time. It's very useful to know how much more / or less memory gets allocated. Since many objects are getting collected in the young generation I need to measure it there.
In the meantime I have an estimate for this. I will post it as an answer.
Thanks, Marcel