svoid monitorThreadAllocatedMemory() { ThreadMXBean bean = threadMXBean(); if (bean instanceof com.sun.management.ThreadMXBean && ((com.sun.management.ThreadMXBean) bean).isThreadAllocatedMemorySupported()) ((com.sun.management.ThreadMXBean) bean).setThreadAllocatedMemoryEnabled(true); }