@@ -0,0 +1,428 @@
+package com.mars.test.java;%0A%0Aimport jdk.nashorn.internal.ir.debug.ObjectSizeCalculator;%0Aimport lombok.extern.slf4j.Slf4j;%0Aimport org.junit.Test;%0A%0A/**%0A * Created by USER on 2017/5/31.%0A */%0A@Slf4j%0Apublic class TestGetObjectMemorySize %7B%0A%0A    @Test%0A    public void test1()%7B%0A        String word1 = %22!askfhj;laksjdflkakjsdlfjal%22;%0A        log.info(%22word1 memory size = %22 + ObjectSizeCalculator.getObjectSize(word1) + %22 bytes%22);%0A    %7D%0A%7D%0A

add ObjectSizeCalculator example