Java Agent for Memory Measurements