public static void main(String[] args) throws IOException {
        testLargeStrToBytes();
//        testLargeStrWriteToEx();
    }
Execute toBytes periodically, use tools to analyze JVM memory allocation.
For example, Memory Allocation Record of YourKit java profiler
src/test/java/com/alibaba/fastjson/serializer/SerializeWriterToBytesTest.java