static long bytesAllocatedByCurrentThread() { var bean = advancedThreadMXBean(); ret bean == null ? 0 : bean.getThreadAllocatedBytes(threadID()); }