Java应用程序的本地内存跟踪分析

news2024/12/25 8:51:59

本文将讨论本机内存跟踪 (NMT),我们可以使用它来隔离在 VM 级别增长的任何异常内存。

1.什么是本机内存?

本机内存是指计算机系统上运行的应用程序或程序可直接访问的内存空间。它是程序在执行期间存储和操作数据的内存区域。本机内存不同于托管内存,后者是由运行时环境或虚拟机管理的内存。

1.1.组成部分

本机内存的主要组件可能因所使用的操作系统和编程语言而异。一般而言,本机内存通常由以下组件组成:

  1. 堆栈
    堆栈是程序执行期间用于存储局部变量、函数调用和其他相关数据的内存区域。每个线程通常都有自己的堆栈。

  2. 堆是用于动态内存分配的内存区域。它是程序执行期间分配和释放对象和数据结构的地方。在 C 和 C++ 等语言中,堆通常由程序员管理,而在 Java 等语言中,堆由运行时环境通过垃圾收集器管理。
  3. 代码内存
    代码内存,也称为可执行内存或文本段,是存储程序编译代码的内存区域。它包含组成程序可执行代码的指令。
  4. 静态变量和全局变量
    静态变量和全局变量的内存空间在程序启动时分配,并在整个程序执行过程中保持不变。这些变量可以在不同范围内访问,并且可以在多个函数或模块之间共享。
  5. 库和DDL
    本机内存还包括共享库或动态链接库 (DLL) 占用的内存。这些库包含可供多个程序使用的预编译代码和资源。
  6. 操作系统数据结构
    操作系统使用内存来存储其数据结构,例如进程控制块、文件表、网络缓冲区和其他与系统相关的数据。
  7. 内存映射文件
    内存映射文件允许将文件视为计算机内存的一部分进行访问。文件的某些部分可以加载到内存中并直接访问,这对于高效的 I/O 操作非常有用。

2.什么是本机内存跟踪 (NMT)?

本机内存跟踪 (NMT) 是 Java 虚拟机 (JVM) 提供的一项功能,允许开发人员监视和分析 Java 应用程序中本机内存的分配和使用情况。它有助于识别和诊断本机内存泄漏和过度内存消耗。

3.如何进行本机内存跟踪 (NMT)?

3.1.确认您当前所使用的JDK版本

不同的JDK版本所使用的工具,以及具体工具的参数可能存在差异,在使用时需要注意,比如我在下面的示例中使用的是JDK17,如下:
在这里插入图片描述

3.2.示例程序

我在此处使用的程序是一个简易的内存占用逐渐增加的JAVA程序,源码如下:

import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.Callable;

public class MemoryLeakExample {
    public static class DataProcessor  {
        private List<byte[]> data = new ArrayList<>();
 
        public void processData() {
            byte[] buffer = new byte[10240];
            new Random().nextBytes(buffer);
            data.add(buffer);
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }

    public static void main(String[] args) {
        DataProcessor processor = new DataProcessor();
        while (true) {
            processor.processData();
        }
    }
}

3.3.编译示例程序

javac MemoryLeakExample.java

3.3.启动示例程序(添加支持NMT功能的参数)

java -XX:NativeMemoryTracking=detail MemoryLeakExample

3.4.定义 NMT 的基线

jcmd {pid} VM.native_memory baseline scale=MB

3.5.捕获内存细节

jcmd {pid} VM.native_memory detail scale=MB > native_memory_detail

上述命令所捕获到的内存细节会保存到native_memory_detail文件中,其内容如下:

3195:

Native Memory Tracking:

(Omitting categories weighting less than 1MB)

Total: reserved=3534MB, committed=219MB
-                 Java Heap (reserved=2048MB, committed=130MB)
                            (mmap: reserved=2048MB, committed=130MB) 
 
-                     Class (reserved=1024MB, committed=0MB)
                            (classes #497)
                            (  instance classes #412, array classes #85)
                            (mmap: reserved=1024MB, committed=0MB) 
                            (  Metadata:   )
                            (    reserved=64MB, committed=0MB)
                            (    used=0MB)
                            (    waste=0MB =56.19%)
                            (  Class space:)
                            (    reserved=1024MB, committed=0MB)
                            (    used=0MB)
                            (    waste=0MB =96.15%)
 
-                    Thread (reserved=21MB, committed=21MB)
                            (thread #21)
                            (stack: reserved=21MB, committed=21MB)
 
-                      Code (reserved=242MB, committed=7MB)
                            (mmap: reserved=242MB, committed=7MB) 
 
-                        GC (reserved=117MB, committed=46MB)
                            (malloc=9MB #803) 
                            (mmap: reserved=108MB, committed=37MB) 
 
-                    Symbol (reserved=1MB, committed=1MB)
                            (malloc=1MB #67) 
 
-        Shared class space (reserved=16MB, committed=12MB)
                            (mmap: reserved=16MB, committed=12MB) 
 
-                 Metaspace (reserved=64MB, committed=0MB)
                            (mmap: reserved=64MB, committed=0MB) 
 
Virtual memory map:
 
[0x0000000105274000 - 0x0000000105374000] reserved and committed 1MB for Thread Stack from
    [0x0000000104779757] JNI_CreateJavaVM+0x57
    [0x0000000103910822] JavaMain+0x122
    [0x00000001039137e9] ThreadJavaMain+0x9
    [0x00007fff5e514661] _pthread_body+0x154

	[0x0000000105274000 - 0x0000000105374000] committed 1MB 
 
[0x000000010cb16000 - 0x000000010cc01000] reserved 1MB for Code from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x00000001046b3400] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x140
    [0x00000001044fb3b5] CodeCache::add_heap(ReservedSpace, char const*, int)+0x115
    [0x00000001044fb071] CodeCache::initialize_heaps()+0x481
 
[0x000000010cc01000 - 0x000000010ccec000] reserved 1MB for Code from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x00000001046b3400] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x140
    [0x00000001044fb3b5] CodeCache::add_heap(ReservedSpace, char const*, int)+0x115
    [0x00000001044fb0be] CodeCache::initialize_heaps()+0x4ce
 
[0x000000010d0f0000 - 0x000000010d4f0000] reserved 4MB for GC from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x000000010460884d] G1CollectedHeap::initialize()+0x2ed
    [0x0000000104c2ce69] universe_init()+0xb9
    [0x00000001046e2ae3] init_globals()+0x33
 
[0x000000010d4f0000 - 0x000000010d8f0000] reserved 4MB for GC from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x000000010460890c] G1CollectedHeap::initialize()+0x3ac
    [0x0000000104c2ce69] universe_init()+0xb9
    [0x00000001046e2ae3] init_globals()+0x33
 
[0x000000010da4f000 - 0x000000010de4f000] reserved 4MB for GC from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x00000001046089cd] G1CollectedHeap::initialize()+0x46d
    [0x0000000104c2ce69] universe_init()+0xb9
    [0x00000001046e2ae3] init_globals()+0x33
 
[0x000000010de4f000 - 0x000000010fe4f000] reserved 32MB for GC from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x0000000104608a7f] G1CollectedHeap::initialize()+0x51f
    [0x0000000104c2ce69] universe_init()+0xb9
    [0x00000001046e2ae3] init_globals()+0x33

	[0x000000010de4f000 - 0x000000010e04f000] committed 2MB from
            [0x0000000104647366] G1PageBasedVirtualSpace::commit_internal(unsigned long, unsigned long)+0x126
            [0x0000000104647566] G1PageBasedVirtualSpace::commit(unsigned long, unsigned long)+0x116
            [0x0000000104651cf4] G1RegionsLargerThanCommitSizeMapper::commit_regions(unsigned int, unsigned long, WorkGang*)+0x104
            [0x00000001046c88fb] HeapRegionManager::commit_regions(unsigned int, unsigned long, WorkGang*)+0xab
 
[0x000000010fe4f000 - 0x0000000111e4f000] reserved 32MB for GC from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x0000000104608b22] G1CollectedHeap::initialize()+0x5c2
    [0x0000000104c2ce69] universe_init()+0xb9
    [0x00000001046e2ae3] init_globals()+0x33

	[0x000000010fe4f000 - 0x000000011004f000] committed 2MB from
            [0x0000000104647366] G1PageBasedVirtualSpace::commit_internal(unsigned long, unsigned long)+0x126
            [0x0000000104647566] G1PageBasedVirtualSpace::commit(unsigned long, unsigned long)+0x116
            [0x0000000104651cf4] G1RegionsLargerThanCommitSizeMapper::commit_regions(unsigned int, unsigned long, WorkGang*)+0x104
            [0x00000001046c8911] HeapRegionManager::commit_regions(unsigned int, unsigned long, WorkGang*)+0xc1
 
[0x0000000111e4f000 - 0x0000000113e4f000] reserved and committed 32MB for GC from
    [0x00000001046142fe] G1CMMarkStack::resize(unsigned long)+0x3e
    [0x000000010461539b] G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap*, G1RegionToSpaceMapper*, G1RegionToSpaceMapper*)+0x68b
    [0x0000000104608f4e] G1CollectedHeap::initialize()+0x9ee
    [0x0000000104c2ce69] universe_init()+0xb9

	[0x0000000111e4f000 - 0x0000000113e4f000] committed 32MB from
            [0x0000000104614317] G1CMMarkStack::resize(unsigned long)+0x57
            [0x000000010461539b] G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap*, G1RegionToSpaceMapper*, G1RegionToSpaceMapper*)+0x68b
            [0x0000000104608f4e] G1CollectedHeap::initialize()+0x9ee
            [0x0000000104c2ce69] universe_init()+0xb9
 
[0x0000000115000000 - 0x0000000116000000] reserved 16MB for Shared class space from
    [0x0000000104a90a43] os::reserve_memory_aligned(unsigned long, unsigned long, bool)+0x23
    [0x0000000104c6c9f5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x345
    [0x0000000104c6c2c3] ReservedSpace::initialize(unsigned long, unsigned long, unsigned long, char*, bool)+0x83
    [0x0000000104a25be8] Metaspace::reserve_address_space_for_compressed_classes(unsigned long)+0x28

	[0x0000000115000000 - 0x0000000115be4000] committed 12MB from
            [0x00000001045eb6ae] FileMapInfo::map_region(int, long, char*, ReservedSpace)+0xae
            [0x00000001045eb528] FileMapInfo::map_regions(int*, int, char*, ReservedSpace)+0xa8
            [0x0000000104a2d139] MetaspaceShared::map_archive(FileMapInfo*, char*, ReservedSpace)+0x79
            [0x0000000104a2c9db] MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0x16b
 
[0x0000000116000000 - 0x0000000156000000] reserved 1024MB for Class from
    [0x0000000104a90a43] os::reserve_memory_aligned(unsigned long, unsigned long, bool)+0x23
    [0x0000000104c6c9f5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x345
    [0x0000000104c6c2c3] ReservedSpace::initialize(unsigned long, unsigned long, unsigned long, char*, bool)+0x83
    [0x0000000104a25be8] Metaspace::reserve_address_space_for_compressed_classes(unsigned long)+0x28
 
[0x0000000156000000 - 0x000000015a000000] reserved 64MB for Metaspace from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x0000000104c6c2c3] ReservedSpace::initialize(unsigned long, unsigned long, unsigned long, char*, bool)+0x83
    [0x0000000104c6b5ff] metaspace::VirtualSpaceNode::create_node(unsigned long, metaspace::CommitLimiter*, metaspace::AbstractCounter<unsigned long>*, metaspace::AbstractCounter<unsigned long>*)+0x4f
    [0x0000000104c6ac5e] metaspace::VirtualSpaceList::allocate_root_chunk()+0x3e
 
[0x0000000780000000 - 0x0000000800000000] reserved 2048MB for Java Heap from
    [0x0000000104c6c98e] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2de
    [0x0000000104c6cd23] ReservedHeapSpace::try_reserve_heap(unsigned long, unsigned long, unsigned long, char*)+0xb3
    [0x0000000104c6d325] ReservedHeapSpace::initialize_compressed_heap(unsigned long, unsigned long, unsigned long)+0x3f5
    [0x0000000104c6d694] ReservedHeapSpace::ReservedHeapSpace(unsigned long, unsigned long, unsigned long, char const*)+0x154

	[0x0000000780000000 - 0x0000000788000000] committed 128MB from
            [0x0000000104647366] G1PageBasedVirtualSpace::commit_internal(unsigned long, unsigned long)+0x126
            [0x0000000104647566] G1PageBasedVirtualSpace::commit(unsigned long, unsigned long)+0x116
            [0x0000000104651cf4] G1RegionsLargerThanCommitSizeMapper::commit_regions(unsigned int, unsigned long, WorkGang*)+0x104
            [0x00000001046c88e5] HeapRegionManager::commit_regions(unsigned int, unsigned long, WorkGang*)+0x95

	[0x00000007ffe76000 - 0x00000007fff00000] committed 1MB from
            [0x0000000104647366] G1PageBasedVirtualSpace::commit_internal(unsigned long, unsigned long)+0x126
            [0x0000000104647566] G1PageBasedVirtualSpace::commit(unsigned long, unsigned long)+0x116
            [0x0000000104651cf4] G1RegionsLargerThanCommitSizeMapper::commit_regions(unsigned int, unsigned long, WorkGang*)+0x104
            [0x00000001046c88e5] HeapRegionManager::commit_regions(unsigned int, unsigned long, WorkGang*)+0x95

	[0x00000007fff00000 - 0x00000007fff80000] committed 1MB from
            [0x00000001045ec75a] FileMapInfo::map_heap_data(MemRegion**, int, int, int*, bool)+0x1ca
            [0x00000001045ec3be] FileMapInfo::map_heap_regions_impl()+0x39e
            [0x00000001045ec8a7] FileMapInfo::map_heap_regions()+0x17
            [0x0000000104a2cbb5] MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0x345

	[0x00000007fff80000 - 0x0000000800000000] committed 1MB from
            [0x0000000104647366] G1PageBasedVirtualSpace::commit_internal(unsigned long, unsigned long)+0x126
            [0x0000000104647566] G1PageBasedVirtualSpace::commit(unsigned long, unsigned long)+0x116
            [0x0000000104651cf4] G1RegionsLargerThanCommitSizeMapper::commit_regions(unsigned int, unsigned long, WorkGang*)+0x104
            [0x00000001046c88e5] HeapRegionManager::commit_regions(unsigned int, unsigned long, WorkGang*)+0x95
 
[0x000001fcf9f2b000 - 0x000001fd08f2b000] reserved 240MB for Code from
    [0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
    [0x0000000104c6d89c] ReservedCodeSpace::ReservedCodeSpace(unsigned long, unsigned long, unsigned long)+0xac
    [0x00000001044fb22e] CodeCache::reserve_heap_memory(unsigned long)+0x8e
    [0x00000001044faf6a] CodeCache::initialize_heaps()+0x37a

	[0x000001fcf9f2b000 - 0x000001fcfa19b000] committed 2MB from
            [0x0000000104c6dcf6] VirtualSpace::expand_by(unsigned long, bool)+0x126
            [0x0000000104c6daf4] VirtualSpace::initialize(ReservedSpace, unsigned long)+0xb4
            [0x00000001046b3359] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x99
            [0x00000001044fb3b5] CodeCache::add_heap(ReservedSpace, char const*, int)+0x115

	[0x000001fd01462000 - 0x000001fd016d2000] committed 2MB from
            [0x0000000104c6dcf6] VirtualSpace::expand_by(unsigned long, bool)+0x126
            [0x0000000104c6daf4] VirtualSpace::initialize(ReservedSpace, unsigned long)+0xb4
            [0x00000001046b3359] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x99
            [0x00000001044fb3b5] CodeCache::add_heap(ReservedSpace, char const*, int)+0x115

	[0x000001fd019f3000 - 0x000001fd01c63000] committed 2MB from
            [0x0000000104c6dcf6] VirtualSpace::expand_by(unsigned long, bool)+0x126
            [0x0000000104c6daf4] VirtualSpace::initialize(ReservedSpace, unsigned long)+0xb4
            [0x00000001046b3359] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x99
            [0x00000001044fb3b5] CodeCache::add_heap(ReservedSpace, char const*, int)+0x115
 
[0x0000700008dea000 - 0x0000700008eea000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700008dea000 - 0x0000700008eea000] committed 1MB 
 
[0x0000700008eed000 - 0x0000700008fed000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700008eed000 - 0x0000700008fed000] committed 1MB 
 
[0x0000700008ff0000 - 0x00007000090f0000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700008ff0000 - 0x00007000090f0000] committed 1MB 
 
[0x00007000090f3000 - 0x00007000091f3000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x00007000090f3000 - 0x00007000091f3000] committed 1MB 
 
[0x00007000091f6000 - 0x00007000092f6000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x00007000091f6000 - 0x00007000092f6000] committed 1MB 
 
[0x00007000092f9000 - 0x00007000093f9000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x00007000092f9000 - 0x00007000093f9000] committed 1MB 
 
[0x00007000093fc000 - 0x00007000094fc000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x00007000093fc000 - 0x00007000094fc000] committed 1MB 
 
[0x00007000094ff000 - 0x00007000095ff000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x00007000094ff000 - 0x00007000095ff000] committed 1MB 
 
[0x0000700009602000 - 0x0000700009702000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009602000 - 0x0000700009702000] committed 1MB 
 
[0x0000700009705000 - 0x0000700009805000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009705000 - 0x0000700009805000] committed 1MB 
 
[0x0000700009808000 - 0x0000700009908000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009808000 - 0x0000700009908000] committed 1MB 
 
[0x000070000990b000 - 0x0000700009a0b000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x000070000990b000 - 0x0000700009a0b000] committed 1MB 
 
[0x0000700009a0e000 - 0x0000700009b0e000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009a0e000 - 0x0000700009b0e000] committed 1MB 
 
[0x0000700009b11000 - 0x0000700009c11000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009b11000 - 0x0000700009c11000] committed 1MB 
 
[0x0000700009c14000 - 0x0000700009d14000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009c14000 - 0x0000700009d14000] committed 1MB 
 
[0x0000700009d17000 - 0x0000700009e17000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009d17000 - 0x0000700009e17000] committed 1MB 
 
[0x0000700009e1a000 - 0x0000700009f1a000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009e1a000 - 0x0000700009f1a000] committed 1MB 
 
[0x0000700009f1d000 - 0x000070000a01d000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x0000700009f1d000 - 0x000070000a01d000] committed 1MB 
 
[0x000070000a020000 - 0x000070000a120000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x000070000a020000 - 0x000070000a120000] committed 1MB 
 
[0x000070000a123000 - 0x000070000a223000] reserved and committed 1MB for Thread Stack from
    [0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
    [0x00007fff5e514661] _pthread_body+0x154
    [0x00007fff5e51450d] _pthread_body+0x0
    [0x00007fff5e513bf9] thread_start+0xd

	[0x000070000a123000 - 0x000070000a223000] committed 1MB 
Details:

[0x00000001046081e1] G1CollectedHeap::G1CollectedHeap()+0x7d1
[0x00000001045f89db] G1Arguments::create_heap()+0x2b
[0x0000000104c2ce31] universe_init()+0x81
[0x00000001046e2ae3] init_globals()+0x33
                             (malloc=4MB type=GC #4)

[0x00000001046154b8] G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap*, G1RegionToSpaceMapper*, G1RegionToSpaceMapper*)+0x7a8
[0x0000000104608f4e] G1CollectedHeap::initialize()+0x9ee
[0x0000000104c2ce69] universe_init()+0xb9
[0x00000001046e2ae3] init_globals()+0x33
                             (malloc=4MB type=GC #4)

[0x0000000104b5a65f] ConcurrentHashTable<StringTableConfig, (MEMFLAGS)10>::ConcurrentHashTable(unsigned long, unsigned long, unsigned long, void*)+0x12f
[0x0000000104b57be8] StringTable::create_table()+0x88
[0x0000000104c2cfd1] universe_init()+0x221
[0x00000001046e2ae3] init_globals()+0x33
                             (malloc=1MB type=Symbol #1)

[0x0000000104c6c98e] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2de
[0x0000000104c6cd23] ReservedHeapSpace::try_reserve_heap(unsigned long, unsigned long, unsigned long, char*)+0xb3
[0x0000000104c6d325] ReservedHeapSpace::initialize_compressed_heap(unsigned long, unsigned long, unsigned long)+0x3f5
[0x0000000104c6d694] ReservedHeapSpace::ReservedHeapSpace(unsigned long, unsigned long, unsigned long, char const*)+0x154
                             (reserved=2048MB, committed=130MB Type=Java Heap)

[0x0000000104a90a43] os::reserve_memory_aligned(unsigned long, unsigned long, bool)+0x23
[0x0000000104c6c9f5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x345
[0x0000000104c6c2c3] ReservedSpace::initialize(unsigned long, unsigned long, unsigned long, char*, bool)+0x83
[0x0000000104a25be8] Metaspace::reserve_address_space_for_compressed_classes(unsigned long)+0x28
                             (reserved=1040MB, committed=12MB Type=Shared class space)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x0000000104c6d89c] ReservedCodeSpace::ReservedCodeSpace(unsigned long, unsigned long, unsigned long)+0xac
[0x00000001044fb22e] CodeCache::reserve_heap_memory(unsigned long)+0x8e
[0x00000001044faf6a] CodeCache::initialize_heaps()+0x37a
                             (reserved=240MB, committed=7MB Type=Code)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x0000000104c6c2c3] ReservedSpace::initialize(unsigned long, unsigned long, unsigned long, char*, bool)+0x83
[0x0000000104c6b5ff] metaspace::VirtualSpaceNode::create_node(unsigned long, metaspace::CommitLimiter*, metaspace::AbstractCounter<unsigned long>*, metaspace::AbstractCounter<unsigned long>*)+0x4f
[0x0000000104c6ac5e] metaspace::VirtualSpaceList::allocate_root_chunk()+0x3e
                             (reserved=64MB, committed=0MB Type=Metaspace)

[0x00000001046142fe] G1CMMarkStack::resize(unsigned long)+0x3e
[0x000000010461539b] G1ConcurrentMark::G1ConcurrentMark(G1CollectedHeap*, G1RegionToSpaceMapper*, G1RegionToSpaceMapper*)+0x68b
[0x0000000104608f4e] G1CollectedHeap::initialize()+0x9ee
[0x0000000104c2ce69] universe_init()+0xb9
                             (reserved=32MB, committed=32MB Type=GC)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x0000000104608a7f] G1CollectedHeap::initialize()+0x51f
[0x0000000104c2ce69] universe_init()+0xb9
[0x00000001046e2ae3] init_globals()+0x33
                             (reserved=32MB, committed=2MB Type=GC)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x0000000104608b22] G1CollectedHeap::initialize()+0x5c2
[0x0000000104c2ce69] universe_init()+0xb9
[0x00000001046e2ae3] init_globals()+0x33
                             (reserved=32MB, committed=2MB Type=GC)

[0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
[0x00007fff5e514661] _pthread_body+0x154
[0x00007fff5e51450d] _pthread_body+0x0
[0x00007fff5e513bf9] thread_start+0xd
                             (reserved=20MB, committed=20MB Type=Thread Stack)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x00000001046089cd] G1CollectedHeap::initialize()+0x46d
[0x0000000104c2ce69] universe_init()+0xb9
[0x00000001046e2ae3] init_globals()+0x33
                             (reserved=4MB, committed=0MB Type=GC)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x000000010460884d] G1CollectedHeap::initialize()+0x2ed
[0x0000000104c2ce69] universe_init()+0xb9
[0x00000001046e2ae3] init_globals()+0x33
                             (reserved=4MB, committed=0MB Type=GC)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x000000010460890c] G1CollectedHeap::initialize()+0x3ac
[0x0000000104c2ce69] universe_init()+0xb9
[0x00000001046e2ae3] init_globals()+0x33
                             (reserved=4MB, committed=0MB Type=GC)

[0x0000000104779757] JNI_CreateJavaVM+0x57
[0x0000000103910822] JavaMain+0x122
[0x00000001039137e9] ThreadJavaMain+0x9
[0x00007fff5e514661] _pthread_body+0x154
                             (reserved=1MB, committed=1MB Type=Thread Stack)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x00000001046b3400] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x140
[0x00000001044fb3b5] CodeCache::add_heap(ReservedSpace, char const*, int)+0x115
[0x00000001044fb0be] CodeCache::initialize_heaps()+0x4ce
                             (reserved=1MB, committed=0MB Type=Code)

[0x0000000104c6c9a5] ReservedSpace::reserve(unsigned long, unsigned long, unsigned long, char*, bool)+0x2f5
[0x00000001046b3400] CodeHeap::reserve(ReservedSpace, unsigned long, unsigned long)+0x140
[0x00000001044fb3b5] CodeCache::add_heap(ReservedSpace, char const*, int)+0x115
[0x00000001044fb071] CodeCache::initialize_heaps()+0x481
                             (reserved=1MB, committed=0MB Type=Code)

(2313 call sites weighting less than 1MB each omitted.)


3.6.捕获差异

jcmd {pid} VM.native_memory detail.diff scale=MB > native_memory_diff
3195:

Native Memory Tracking:

(Omitting categories weighting less than 1MB)

Total: reserved=3534MB +2MB, committed=219MB +2MB

-                 Java Heap (reserved=2048MB, committed=130MB)
                            (mmap: reserved=2048MB, committed=130MB)
 
-                     Class (reserved=1024MB, committed=0MB)
                            (classes #497)
                            (  instance classes #412, array classes #85)
                            (mmap: reserved=1024MB, committed=0MB)
                           : (  Metadata)
                            (    reserved=64MB, committed=0MB)
                            (    used=0MB)
                            (    waste=0MB =56.19%)
                           : (  Class space)
                            (    reserved=1024MB, committed=0MB)
                            (    used=0MB)
                            (    waste=0MB =96.15%)
 
-                    Thread (reserved=21MB +2MB, committed=21MB +2MB)
                            (thread #0)
                            (stack: reserved=21MB +2MB, committed=21MB +2MB)
 
-                      Code (reserved=242MB, committed=7MB)
                            (mmap: reserved=242MB, committed=7MB)
 
-                        GC (reserved=117MB, committed=46MB)
                            (malloc=9MB #804 +226)
                            (mmap: reserved=108MB, committed=37MB)
 
-                    Symbol (reserved=1MB, committed=1MB)
                            (malloc=1MB #67)
 
-        Shared class space (reserved=16MB, committed=12MB)
                            (mmap: reserved=16MB, committed=12MB)
 
-                 Metaspace (reserved=64MB, committed=0MB)
                            (mmap: reserved=64MB, committed=0MB)
 
[0x0000000104a8b5e8] thread_native_entry(Thread*)+0x148
[0x00007fff5e514661] _pthread_body+0x154
[0x00007fff5e51450d] _pthread_body+0x0
[0x00007fff5e513bf9] thread_start+0xd
                             (mmap: reserved=20MB +2MB, committed=20MB +2MB Type=Thread Stack)

3.7.借助JCMD工具进行定位分析

jcmd {pid} help
JFR.dump
JFR.start
JFR.stop
JVMTI.agent_load
JVMTI.data_dump
ManagementAgent.start
ManagementAgent.start_local
ManagementAgent.status
ManagementAgent.stop
Thread.print
VM.cds
VM.class_hierarchy
VM.classloader_stats
VM.classloaders
VM.command_line
VM.dynlibs
VM.events
VM.flags
VM.info
VM.log
VM.metaspace
VM.native_memory
VM.print_touched_methods
VM.set_flag
VM.stringtable
VM.symboltable
VM.system_properties
VM.systemdictionary
VM.uptime
VM.version
help

For more information about a specific command use 'help <command>'.

3.7.1.VM.classloader_stats

jcmd {pid} VM.classloader_stats
3195:
ClassLoader         Parent              CLD*               Classes   ChunkSz   BlockSz  Type
0x00000001150840a0  0x0000000115086378  0x00007fb585f0f940       2       768       508  jdk.internal.loader.ClassLoaders$AppClassLoader
0x0000000115086378  0x0000000000000000  0x00007fb585f0d6d0       0         0         0  jdk.internal.loader.ClassLoaders$PlatformClassLoader
0x0000000000000000  0x0000000000000000  0x00007fb585c6a650     495    557056     10889  <boot class loader>
Total = 3                                                      497    557824     11397  
ChunkSz: Total size of all allocated metaspace chunks
BlockSz: Total size of all allocated metaspace blocks (each chunk has several blocks)

3.7.2.VM.class_hierarchy

jcmd {pid} VM.class_hierarchy
3195:
java.lang.Object/null
|--java.security.SecureClassLoader$DebugHolder/null
|--jdk.internal.loader.URLClassPath/null
|--java.net.URLStreamHandlerFactory/null (intf)
|--sun.invoke.util.VerifyAccess/null
|--java.lang.ThreadGroup/null
|--java.lang.reflect.Modifier/null
|--java.util.Map/null (intf)
|--java.lang.invoke.MemberName/null
|--jdk.internal.access.JavaLangModuleAccess/null (intf)
|--jdk.internal.reflect.ReflectionFactory$GetReflectionFactoryAction/null
|--java.lang.module.ModuleDescriptor$1/null
|--java.util.Arrays/null
|--jdk.internal.reflect.MethodAccessor/null (intf)
|--java.lang.reflect.ReflectAccess/null
|--jdk.internal.access.JavaLangReflectAccess/null (intf)
|--jdk.internal.access.SharedSecrets/null
|--java.lang.Math/null
|--java.lang.StackFrameInfo/null
|  |--java.lang.LiveStackFrameInfo/null
|--java.lang.PublicMethods$Key/null
|--java.io.File/null
|--java.io.Writer/null
|  |--java.io.OutputStreamWriter/null
|  |--java.io.BufferedWriter/null
|  |--sun.nio.cs.StreamEncoder/null
|--java.lang.reflect.Array/null
|--java.lang.module.ModuleDescriptor$Provides/null
|--sun.nio.ByteBuffered/null (intf)
|--java.lang.StackWalker$StackFrame/null (intf)
|--java.lang.module.ModuleDescriptor$Version/null
|--java.lang.LiveStackFrame/null (intf)
|--java.lang.PublicMethods$MethodList/null
|--java.lang.Class$Atomic/null
|--java.lang.invoke.MethodHandles/null
|--java.nio.charset.Charset/null
|  |--sun.nio.cs.Unicode/null
|  |  |--sun.nio.cs.UTF_8/null
|--java.lang.invoke.MethodHandle/null
|  |--java.lang.invoke.DirectMethodHandle/null
|--sun.security.action.GetPropertyAction/null
|--jdk.internal.loader.URLClassPath$3/null
|--java.lang.Module$ArchivedData/null
|--sun.nio.cs.HistoricallyNamedCharset/null (intf)
|--jdk.internal.loader.URLClassPath$Loader/null
|  |--jdk.internal.loader.URLClassPath$FileLoader/null
|--java.lang.Void/null
|--java.util.jar.Manifest/null
|--jdk.internal.loader.ClassLoaderHelper/null
|--java.net.URLStreamHandler/null
|  |--sun.net.www.protocol.file.Handler/null
|--java.io.ObjectStreamField/null
|--java.lang.reflect.Parameter/null
|--java.io.DefaultFileSystem/null
|--java.security.SecureClassLoader$CodeSourceKey/null
|--java.security.SecureClassLoader$1/null
|--java.util.KeyValueHolder/null
|--java.util.concurrent.locks.AbstractOwnableSynchronizer/null
|--jdk.internal.misc.Unsafe/null
|--java.lang.Boolean/null
|--jdk.internal.loader.ClassLoaders/null
|--jdk.internal.misc.VM/null
|--jdk.internal.reflect.Reflection/null
|--jdk.internal.vm.PostVMInitHook$1/null
|--java.security.PermissionCollection/null
|  |--sun.security.util.LazyCodeSourcePermissionCollection/null
|  |--java.security.BasicPermissionCollection/null
|  |--java.security.Permissions/null
|--java.security.cert.Certificate/null
|--jdk.internal.module.ModuleHashes$HashSupplier/null (intf)
|--java.net.URI$1/null
|--java.lang.ref.Cleaner/null
|--java.util.HashMap$Node/null
|  |--java.util.LinkedHashMap$Entry/null
|  |  |--java.util.HashMap$TreeNode/null
|--sun.launcher.LauncherHelper/null
|--jdk.internal.module.SystemModuleFinders$3/null
|--java.util.concurrent.ThreadFactory/null (intf)
|--sun.net.util.URLUtil/null
|--java.lang.Runtime/null
|--java.lang.module.ModuleFinder/null (intf)
|--java.util.AbstractCollection/null
|  |--java.util.AbstractSet/null
|  |  |--java.util.ImmutableCollections$MapN$1/null
|  |  |--java.util.HashMap$EntrySet/null
|  |  |--java.util.Collections$SetFromMap/null
|  |  |--java.util.Collections$EmptySet/null
|  |  |--java.util.HashSet/null
|  |  |--java.util.WeakHashMap$KeySet/null
|  |--java.util.ArrayDeque/null
|  |--java.util.AbstractList/null
|  |  |--java.util.Collections$EmptyList/null
|  |  |--java.util.ArrayList/null
|  |--java.util.ImmutableCollections$AbstractImmutableCollection/null
|  |  |--java.util.ImmutableCollections$AbstractImmutableSet/null
|  |  |  |--java.util.ImmutableCollections$SetN/null
|  |  |  |--java.util.ImmutableCollections$Set12/null
|  |  |--java.util.ImmutableCollections$AbstractImmutableList/null
|  |  |  |--java.util.ImmutableCollections$ListN/null
|  |  |  |--java.util.ImmutableCollections$List12/null
|--java.security.PrivilegedExceptionAction/null (intf)
|--jdk.internal.ref.CleanerFactory$1/null
|--java.lang.ClassLoader$ParallelLoaders/null
|--jdk.internal.module.Modules/null
|--jdk.internal.module.SystemModuleFinders$SystemModuleFinder/null
|--java.lang.StackTraceElement/null
|--java.net.URL/null
|--jdk.internal.loader.NativeLibraries/null
|--java.lang.Thread$UncaughtExceptionHandler/null (intf)
|--java.util.Optional/null
|--java.util.random.RandomGenerator/null (intf)
|--jdk.internal.misc.OSEnvironment/null
|--java.security.CodeSource/null
|--java.io.FileSystem/null
|  |--java.io.UnixFileSystem/null
|--java.lang.invoke.MemberName$Factory/null
|--java.util.Collections/null
|--jdk.internal.reflect.ConstantPool/null
|--java.security.ProtectionDomain/null
|--jdk.internal.util.ArraysSupport/null
|--java.security.Guard/null (intf)
|--java.util.Comparator/null (intf)
|--jdk.internal.reflect.FieldAccessor/null (intf)
|--java.lang.String/null
|--java.security.Permission/null
|  |--java.security.BasicPermission/null
|  |  |--java.lang.RuntimePermission/null
|  |  |--java.lang.reflect.ReflectPermission/null
|  |--java.security.AllPermission/null
|  |--java.security.UnresolvedPermission/null
|--java.lang.String$CaseInsensitiveComparator/null
|--java.lang.annotation.Annotation/null (intf)
|--java.nio.charset.spi.CharsetProvider/null
|  |--sun.nio.cs.StandardCharsets/null
|--java.lang.StringLatin1/null
|--java.util.Random/null
|--jdk.internal.reflect.CallerSensitive/null (intf)
|--java.util.Queue/null (intf)
|--java.security.Principal/null (intf)
|--java.util.HexFormat/null
|--java.util.RandomAccess/null (intf)
|--java.security.AccessControlContext/null
|--jdk.internal.access.JavaSecurityAccess/null (intf)
|--java.util.Hashtable$Entry/null
|--java.security.ProtectionDomain$JavaSecurityAccessImpl/null
|--jdk.internal.math.FDBigInteger/null
|--java.security.ProtectionDomain$Key/null
|--java.util.Deque/null (intf)
|--java.lang.StringCoding/null
|--MemoryLeakExample$DataProcessor/0x00007fb585f0f940
|--MemoryLeakExample/0x00007fb585f0f940
|--java.net.URL$DefaultFactory/null
|--java.lang.StackStreamFactory$AbstractStackWalker/null
|--java.lang.invoke.VarHandle/null
|--jdk.internal.access.JavaNetURLAccess/null (intf)
|--jdk.internal.loader.Resource/null
|  |--jdk.internal.loader.URLClassPath$FileLoader$1/null
|--java.io.FileInputStream$1/null
|--java.net.URL$3/null
|--java.lang.Module/null
|--java.lang.NamedPackage/null
|--java.lang.constant.ConstantDesc/null (intf)
|--sun.net.www.ParseUtil/null
|--java.lang.SecurityManager/null
|--java.lang.invoke.TypeDescriptor$OfMethod/null (intf)
|--java.util.Collections$UnmodifiableMap/null
|--java.lang.Class$ReflectionData/null
|--jdk.internal.ref.CleanerFactory/null
|--jdk.internal.reflect.ConstructorAccessor/null (intf)
|--java.lang.StackWalker/null
|--java.lang.ref.Cleaner$1/null
|--java.lang.module.ModuleDescriptor$Requires/null
|--java.lang.Throwable/null
|  |--java.lang.Error/null
|  |  |--java.lang.ThreadDeath/null
|  |  |--java.lang.LinkageError/null
|  |  |  |--java.lang.NoClassDefFoundError/null
|  |  |  |--java.lang.BootstrapMethodError/null
|  |  |--java.lang.VirtualMachineError/null
|  |  |  |--java.lang.InternalError/null
|  |  |  |--java.lang.OutOfMemoryError/null
|  |  |  |--java.lang.StackOverflowError/null
|  |--java.lang.Exception/null
|  |  |--java.lang.InterruptedException/null
|  |  |--java.lang.RuntimeException/null
|  |  |  |--java.lang.ClassCastException/null
|  |  |  |--java.lang.NullPointerException/null
|  |  |  |--java.lang.ArithmeticException/null
|  |  |  |--java.lang.ArrayStoreException/null
|  |  |  |--java.lang.IllegalArgumentException/null
|  |  |  |--java.lang.IllegalMonitorStateException/null
|  |  |--java.lang.ReflectiveOperationException/null
|  |  |  |--java.lang.ClassNotFoundException/null
|--jdk.internal.reflect.MagicAccessorImpl/null
|  |--jdk.internal.reflect.FieldAccessorImpl/null
|  |  |--jdk.internal.reflect.UnsafeFieldAccessorImpl/null
|  |  |  |--jdk.internal.reflect.UnsafeStaticFieldAccessorImpl/null
|  |--jdk.internal.reflect.MethodAccessorImpl/null
|  |--jdk.internal.reflect.ConstructorAccessorImpl/null
|  |  |--jdk.internal.reflect.NativeConstructorAccessorImpl/null
|--jdk.internal.ref.CleanerImpl/null
|--java.lang.module.ModuleDescriptor$Exports/null
|--java.lang.invoke.MethodType/null
|--java.lang.module.ModuleDescriptor$Opens/null
|--java.util.function.Function/null (intf)
|--java.lang.invoke.CallSite/null
|  |--java.lang.invoke.ConstantCallSite/null
|  |--java.lang.invoke.MutableCallSite/null
|  |--java.lang.invoke.VolatileCallSite/null
|--java.lang.reflect.Member/null (intf)
|--jdk.internal.invoke.NativeEntryPoint/null
|--java.lang.invoke.MethodHandleNatives$CallSiteContext/null
|--java.lang.invoke.StringConcatFactory/null
|--java.lang.AssertionStatusDirectives/null
|--java.security.PrivilegedAction/null (intf)
|--sun.util.locale.BaseLocale$Key/null
|--jdk.internal.module.ModuleTarget/null
|--java.lang.reflect.AccessibleObject/null
|  |--java.lang.reflect.Field/null
|  |--java.lang.reflect.Executable/null
|  |  |--java.lang.reflect.Method/null
|  |  |--java.lang.reflect.Constructor/null
|--java.lang.invoke.MethodHandleStatics/null
|--java.security.AccessController/null
|--jdk.internal.module.ModuleBootstrap/null
|--jdk.internal.module.ServicesCatalog/null
|--jdk.internal.access.JavaLangRefAccess/null (intf)
|--java.lang.ref.Reference$1/null
|--sun.util.locale.LocaleUtils/null
|--jdk.internal.misc.Signal$Handler/null (intf)
|--java.lang.Runnable/null (intf)
|--jdk.internal.loader.BootLoader/null
|--java.lang.Terminator$1/null
|--java.lang.ClassLoader/null
|  |--java.security.SecureClassLoader/null
|  |  |--jdk.internal.loader.BuiltinClassLoader/null
|  |  |  |--jdk.internal.loader.ClassLoaders$PlatformClassLoader/null
|  |  |  |--jdk.internal.loader.ClassLoaders$AppClassLoader/null
|  |  |  |--jdk.internal.loader.ClassLoaders$BootClassLoader/null
|  |--jdk.internal.reflect.DelegatingClassLoader/null
|--jdk.internal.reflect.ReflectionFactory/null
|--jdk.internal.misc.Signal/null
|--java.lang.System/null
|--java.lang.Comparable/null (intf)
|--java.lang.Thread/null
|  |--java.lang.ref.Reference$ReferenceHandler/null
|  |--jdk.internal.misc.InnocuousThread/null
|  |--java.lang.ref.Finalizer$FinalizerThread/null
|--java.lang.ref.ReferenceQueue/null
|  |--java.lang.ref.ReferenceQueue$Null/null
|--java.util.concurrent.ConcurrentMap/null (intf)
|--java.nio.ByteOrder/null
|--sun.net.util.IPAddressUtil/null
|--java.lang.Terminator/null
|--sun.util.locale.BaseLocale/null
|--jdk.internal.util.Preconditions/null
|--jdk.internal.module.ModuleLoaderMap$Mapper/null
|--java.lang.module.ModuleReference/null
|  |--jdk.internal.module.ModuleReferenceImpl/null
|--java.lang.ModuleLayer/null
|--java.lang.invoke.StringConcatFactory$3/null
|--java.util.function.Supplier/null (intf)
|--java.lang.CharacterData/null
|  |--java.lang.CharacterDataLatin1/null
|--java.lang.invoke.StringConcatFactory$2/null
|--java.lang.Enum/null
|  |--java.lang.module.ModuleDescriptor$Requires$Modifier/null
|  |--java.io.File$PathStatus/null
|--jdk.internal.access.JavaIOFileDescriptorAccess/null (intf)
|--java.lang.module.ModuleDescriptor/null
|--java.lang.invoke.StringConcatFactory$1/null
|--java.io.FileDescriptor/null
|--java.util.concurrent.locks.LockSupport/null
|--java.io.FileDescriptor$1/null
|--jdk.internal.vm.PostVMInitHook/null
|--java.lang.Long$LongCache/null
|--java.nio.charset.CharsetEncoder/null
|  |--sun.nio.cs.UTF_8$Encoder/null
|--jdk.internal.module.ModulePatcher/null
|--java.lang.Byte$ByteCache/null
|--java.lang.invoke.LambdaForm/null
|--java.io.InputStream/null
|  |--java.io.FilterInputStream/null
|  |  |--java.io.BufferedInputStream/null
|  |--java.io.ByteArrayInputStream/null
|  |--java.io.FileInputStream/null
|--java.lang.Short$ShortCache/null
|--java.util.AbstractMap/null
|  |--java.util.ImmutableCollections$AbstractImmutableMap/null
|  |  |--java.util.ImmutableCollections$MapN/null
|  |--java.util.concurrent.ConcurrentHashMap/null
|  |--java.util.HashMap/null
|  |--java.util.Collections$EmptyMap/null
|  |--java.util.WeakHashMap/null
|--jdk.internal.access.JavaNioAccess/null (intf)
|--jdk.internal.module.SystemModuleFinders$2/null
|--java.lang.Character$CharacterCache/null
|--java.lang.AbstractStringBuilder/null
|  |--java.lang.StringBuilder/null
|  |--java.lang.StringBuffer/null
|--java.util.List/null (intf)
|--jdk.internal.access.JavaNetUriAccess/null (intf)
|--java.nio.Buffer$1/null
|--jdk.internal.module.ModuleHashes/null
|--java.util.HashMap$HashIterator/null
|  |--java.util.HashMap$EntryIterator/null
|--jdk.internal.util.StaticProperty/null
|--sun.util.locale.LocaleObjectCache/null
|  |--sun.util.locale.BaseLocale$Cache/null
|  |--java.util.Locale$Cache/null
|--java.lang.CharSequence/null (intf)
|--jdk.internal.misc.Signal$NativeHandler/null
|--java.util.ImmutableCollections$MapN$MapNIterator/null
|--java.util.Map$Entry/null (intf)
|--java.util.ImmutableCollections/null
|--jdk.internal.access.JavaLangAccess/null (intf)
|--jdk.internal.misc.CDS/null
|--java.util.Set/null (intf)
|--java.lang.invoke.MethodHandles$Lookup/null
|--java.lang.Record/null
|--java.util.concurrent.locks.Lock/null (intf)
|--jdk.internal.module.ModuleBootstrap$Counters/null
|--java.util.concurrent.locks.ReentrantLock/null
|  |--java.util.concurrent.ConcurrentHashMap$Segment/null
|--jdk.internal.module.ArchivedBootLayer/null
|--java.util.concurrent.ConcurrentHashMap$CounterCell/null
|--jdk.internal.module.ArchivedModuleGraph/null
|--java.util.concurrent.ConcurrentHashMap$Node/null
|  |--java.util.concurrent.ConcurrentHashMap$ReservationNode/null
|--java.util.Iterator/null (intf)
|--java.lang.reflect.RecordComponent/null
|--java.net.URI/null
|--java.util.Collection/null (intf)
|--jdk.internal.vm.vector.VectorSupport/null
|--java.lang.Iterable/null (intf)
|--jdk.internal.module.ServicesCatalog$ServiceProvider/null
|--java.lang.invoke.MethodHandleNatives/null
|--java.util.Objects/null
|--jdk.internal.loader.ArchivedClassLoaders/null
|--java.lang.invoke.ResolvedMethodName/null
|--java.lang.module.ResolvedModule/null
|--jdk.internal.vm.vector.VectorSupport$VectorPayload/null
|  |--jdk.internal.vm.vector.VectorSupport$Vector/null
|  |--jdk.internal.vm.vector.VectorSupport$VectorMask/null
|  |--jdk.internal.vm.vector.VectorSupport$VectorShuffle/null
|--java.util.concurrent.CopyOnWriteArrayList/null
|--sun.security.util.Debug/null
|--java.util.Dictionary/null
|  |--java.util.Hashtable/null
|  |  |--java.util.Properties/null
|--java.util.Locale/null
|--java.lang.ThreadLocal/null
|--java.lang.Number/null
|  |--java.lang.Long/null
|  |--java.lang.Integer/null
|  |--java.lang.Double/null
|  |--java.lang.Float/null
|  |--java.lang.Short/null
|  |--java.lang.Byte/null
|  |--java.util.concurrent.atomic.AtomicInteger/null
|  |--java.util.concurrent.atomic.AtomicLong/null
|--java.io.Serializable/null (intf)
|--java.lang.Integer$IntegerCache/null
|--java.lang.StringConcatHelper/null
|--java.lang.VersionProps/null
|--java.lang.constant.Constable/null (intf)
|--jdk.internal.util.SystemProps$Raw/null
|--java.util.jar.Attributes$Name/null
|--java.lang.reflect.Type/null (intf)
|--java.lang.System$2/null
|--java.lang.ref.Cleaner$Cleanable/null (intf)
|--java.lang.reflect.GenericDeclaration/null (intf)
|--jdk.internal.util.SystemProps/null
|--java.lang.invoke.TypeDescriptor/null (intf)
|--java.lang.Appendable/null (intf)
|--java.lang.ref.ReferenceQueue$Lock/null
|--java.io.Flushable/null (intf)
|--java.lang.reflect.AnnotatedElement/null (intf)
|--java.lang.ref.Reference/null
|  |--java.lang.ref.SoftReference/null
|  |  |--sun.util.locale.LocaleObjectCache$CacheEntry/null
|  |--java.lang.ref.WeakReference/null
|  |  |--java.util.WeakHashMap$Entry/null
|  |--java.lang.ref.FinalReference/null
|  |  |--java.lang.ref.Finalizer/null
|  |--java.lang.ref.PhantomReference/null
|  |  |--jdk.internal.ref.Cleaner/null
|  |  |--jdk.internal.ref.PhantomCleanable/null
|  |  |  |--jdk.internal.ref.CleanerImpl$PhantomCleanableRef/null
|  |  |  |--jdk.internal.ref.CleanerImpl$CleanerCleanable/null
|  |  |  |--java.io.FileCleanable/null
|--java.io.Closeable/null (intf)
|--java.nio.charset.CodingErrorAction/null
|--java.lang.AutoCloseable/null (intf)
|--java.lang.invoke.TypeDescriptor$OfField/null (intf)
|--java.lang.Character/null
|--java.lang.Class/null
|--jdk.internal.loader.AbstractClassLoaderValue/null
|  |--jdk.internal.loader.ClassLoaderValue/null
|--jdk.internal.loader.BuiltinClassLoader$LoadedModule/null
|--jdk.internal.misc.ScopedMemoryAccess/null
|--java.lang.module.Configuration/null
|--jdk.internal.misc.UnsafeConstants/null
|--java.lang.Cloneable/null (intf)
|--java.io.OutputStream/null
|  |--java.io.FileOutputStream/null
|  |--java.io.FilterOutputStream/null
|  |  |--java.io.PrintStream/null
|  |  |--java.io.BufferedOutputStream/null
|--java.nio.Buffer/null
|  |--java.nio.ByteBuffer/null
|  |  |--java.nio.HeapByteBuffer/null

3.7.3.GC.class_histogram

3.7.3.1.第一次
jcmd {pid} GC.class_histogram
3195:
 num     #instances         #bytes  class name (module)
-------------------------------------------------------
   1:         12293       46516400  [B (java.base@17.0.8)
   2:          7710         185040  java.lang.String (java.base@17.0.8)
   3:          1428         177896  java.lang.Class (java.base@17.0.8)
   4:           879         117344  [Ljava.lang.Object; (java.base@17.0.8)
   5:             6          33016  [C (java.base@17.0.8)
   6:           998          31936  java.util.HashMap$Node (java.base@17.0.8)
   7:           467          30904  [I (java.base@17.0.8)
   8:           905          28960  java.util.concurrent.ConcurrentHashMap$Node (java.base@17.0.8)
   9:           257          23696  [Ljava.util.HashMap$Node; (java.base@17.0.8)
  10:            19          19312  [Ljava.util.concurrent.ConcurrentHashMap$Node; (java.base@17.0.8)
  11:           259          12432  java.util.HashMap (java.base@17.0.8)
  12:           341          10912  jdk.internal.math.FDBigInteger (java.base@17.0.8)
  13:           362           8688  java.lang.module.ModuleDescriptor$Exports (java.base@17.0.8)
  14:           256           6144  java.lang.Long (java.base@17.0.8)
  15:           248           5952  java.util.ImmutableCollections$Set12 (java.base@17.0.8)
  16:            62           4960  java.net.URI (java.base@17.0.8)
  17:           132           4224  java.lang.module.ModuleDescriptor$Requires (java.base@17.0.8)
  18:           256           4096  java.lang.Byte (java.base@17.0.8)
  19:           256           4096  java.lang.Integer (java.base@17.0.8)
  20:           256           4096  java.lang.Short (java.base@17.0.8)
  21:            62           3968  java.lang.module.ModuleDescriptor (java.base@17.0.8)
  22:            68           3808  java.lang.Module (java.base@17.0.8)
  23:            10           3680  java.lang.Thread (java.base@17.0.8)
  24:            62           3472  jdk.internal.module.ModuleReferenceImpl (java.base@17.0.8)
  25:           137           3288  java.util.ImmutableCollections$SetN (java.base@17.0.8)
  26:           196           3136  java.util.HashSet (java.base@17.0.8)
  27:            39           2496  java.util.concurrent.ConcurrentHashMap (java.base@17.0.8)
  28:           128           2048  java.lang.Character (java.base@17.0.8)
  29:            61           1952  jdk.internal.loader.BuiltinClassLoader$LoadedModule (java.base@17.0.8)
  30:             7           1864  [J (java.base@17.0.8)
  31:            62           1488  java.lang.module.ResolvedModule (java.base@17.0.8)
  32:            62           1488  jdk.internal.module.ServicesCatalog$ServiceProvider (java.base@17.0.8)
  33:            62           1488  jdk.internal.module.SystemModuleFinders$2 (java.base@17.0.8)
  34:            60           1440  java.lang.module.ModuleDescriptor$Provides (java.base@17.0.8)
  35:             1           1376  [Ljdk.internal.math.FDBigInteger; (java.base@17.0.8)
  36:            50           1200  java.util.ImmutableCollections$List12 (java.base@17.0.8)
  37:            72           1152  java.lang.Object (java.base@17.0.8)
  38:             1           1040  [Ljava.lang.Byte; (java.base@17.0.8)
  39:             1           1040  [Ljava.lang.Integer; (java.base@17.0.8)
  40:             1           1040  [Ljava.lang.Long; (java.base@17.0.8)
  41:             1           1040  [Ljava.lang.Short; (java.base@17.0.8)
  42:            24            960  java.io.ObjectStreamField (java.base@17.0.8)
  43:            60            960  jdk.internal.module.SystemModuleFinders$3 (java.base@17.0.8)
  44:            12            864  java.lang.reflect.Field (java.base@17.0.8)
  45:            30            720  java.util.concurrent.CopyOnWriteArrayList (java.base@17.0.8)
  46:            20            640  java.util.Locale (java.base@17.0.8)
  47:            20            640  sun.util.locale.BaseLocale (java.base@17.0.8)
  48:            26            624  java.util.jar.Attributes$Name (java.base@17.0.8)
  49:             1            528  [Ljava.lang.Character; (java.base@17.0.8)
  50:            13            520  java.security.AccessControlContext (java.base@17.0.8)
  51:             6            480  [S (java.base@17.0.8)
  52:            12            480  java.lang.OutOfMemoryError (java.base@17.0.8)
  53:             1            376  java.lang.ref.Finalizer$FinalizerThread (java.base@17.0.8)
  54:             1            376  jdk.internal.misc.InnocuousThread (java.base@17.0.8)
  55:             1            368  java.lang.ref.Reference$ReferenceHandler (java.base@17.0.8)
  56:            14            336  java.util.ImmutableCollections$ListN (java.base@17.0.8)
  57:             8            240  [Ljava.io.ObjectStreamField; (java.base@17.0.8)
  58:             7            224  java.util.Hashtable$Entry (java.base@17.0.8)
  59:             9            216  java.util.ArrayList (java.base@17.0.8)
  60:             5            200  java.security.ProtectionDomain (java.base@17.0.8)
  61:             5            200  java.util.WeakHashMap$Entry (java.base@17.0.8)
  62:             6            192  java.lang.ref.ReferenceQueue (java.base@17.0.8)
  63:             4            160  java.security.CodeSource (java.base@17.0.8)
  64:             5            160  java.util.ImmutableCollections$MapN (java.base@17.0.8)
  65:             5            144  [Ljava.lang.String; (java.base@17.0.8)
  66:             3            144  java.lang.ThreadGroup (java.base@17.0.8)
  67:             6            144  java.lang.module.ModuleDescriptor$Requires$Modifier (java.base@17.0.8)
  68:             3            144  java.util.Hashtable (java.base@17.0.8)
  69:             3            128  [Ljava.util.Hashtable$Entry; (java.base@17.0.8)
  70:             2            128  java.lang.Class$ReflectionData (java.base@17.0.8)
  71:             8            128  java.lang.ref.ReferenceQueue$Lock (java.base@17.0.8)
  72:             4            128  jdk.internal.loader.NativeLibraries (java.base@17.0.8)
  73:             3            120  java.io.FileDescriptor (java.base@17.0.8)
  74:             3            120  java.lang.ref.SoftReference (java.base@17.0.8)
  75:             3            112  [Ljava.lang.Thread; (java.base@17.0.8)
  76:             2            112  [Ljava.lang.invoke.MethodHandle; (java.base@17.0.8)
  77:             2            112  java.nio.HeapByteBuffer (java.base@17.0.8)
  78:             1            104  jdk.internal.loader.ClassLoaders$AppClassLoader (java.base@17.0.8)
  79:             1            104  jdk.internal.loader.ClassLoaders$BootClassLoader (java.base@17.0.8)
  80:             1            104  jdk.internal.loader.ClassLoaders$PlatformClassLoader (java.base@17.0.8)
  81:             1             96  [Lsun.util.locale.BaseLocale; (java.base@17.0.8)
  82:             3             96  java.lang.invoke.MethodHandles$Lookup (java.base@17.0.8)
  83:             4             96  java.lang.module.ModuleDescriptor$Opens (java.base@17.0.8)
  84:             2             96  sun.nio.cs.StreamEncoder (java.base@17.0.8)
  85:             2             96  sun.nio.cs.UTF_8$Encoder (java.base@17.0.8)
  86:             1             88  java.lang.reflect.Method (java.base@17.0.8)
  87:             2             80  [Ljava.lang.OutOfMemoryError; (java.base@17.0.8)
  88:             5             80  [Ljava.security.Principal; (java.base@17.0.8)
  89:             1             80  [Ljava.util.WeakHashMap$Entry; (java.base@17.0.8)
  90:             2             80  java.io.BufferedWriter (java.base@17.0.8)
  91:             2             80  java.io.PrintStream (java.base@17.0.8)
  92:             2             80  java.lang.IllegalArgumentException (java.base@17.0.8)
  93:             2             80  java.lang.ModuleLayer (java.base@17.0.8)
  94:             2             80  java.lang.module.Configuration (java.base@17.0.8)
  95:             5             80  java.security.ProtectionDomain$Key (java.base@17.0.8)
  96:             2             80  sun.util.locale.LocaleObjectCache$CacheEntry (java.base@17.0.8)
  97:             3             72  jdk.internal.misc.Signal (java.base@17.0.8)
  98:             1             64  [Ljava.lang.reflect.Field; (java.base@17.0.8)
  99:             2             64  java.io.BufferedOutputStream (java.base@17.0.8)
 100:             2             64  java.io.FileOutputStream (java.base@17.0.8)
 101:             2             64  java.lang.ref.ReferenceQueue$Null (java.base@17.0.8)
 102:             1             64  java.net.URL (java.base@17.0.8)
 103:             2             64  java.util.HexFormat (java.base@17.0.8)
 104:             3             56  [Ljava.lang.Class; (java.base@17.0.8)
 105:             1             56  java.util.Properties (java.base@17.0.8)
 106:             2             48  [Ljava.security.ProtectionDomain; (java.base@17.0.8)
 107:             2             48  java.io.File$PathStatus (java.base@17.0.8)
 108:             2             48  java.io.OutputStreamWriter (java.base@17.0.8)
 109:             1             48  java.lang.NullPointerException (java.base@17.0.8)
 110:             3             48  java.nio.charset.CodingErrorAction (java.base@17.0.8)
 111:             2             48  java.util.ArrayDeque (java.base@17.0.8)
 112:             1             48  java.util.WeakHashMap (java.base@17.0.8)
 113:             3             48  jdk.internal.loader.ClassLoaderValue (java.base@17.0.8)
 114:             2             48  jdk.internal.misc.Signal$NativeHandler (java.base@17.0.8)
 115:             3             48  jdk.internal.module.ServicesCatalog (java.base@17.0.8)
 116:             1             48  jdk.internal.ref.CleanerImpl$PhantomCleanableRef (java.base@17.0.8)
 117:             1             40  java.io.BufferedInputStream (java.base@17.0.8)
 118:             1             40  java.lang.ArithmeticException (java.base@17.0.8)
 119:             1             40  java.lang.VirtualMachineError (java.base@17.0.8)
 120:             1             40  jdk.internal.loader.URLClassPath (java.base@17.0.8)
 121:             1             40  jdk.internal.ref.CleanerImpl$CleanerCleanable (java.base@17.0.8)
 122:             2             32  [Ljava.lang.StackTraceElement; (java.base@17.0.8)
 123:             1             32  [Ljava.lang.ThreadGroup; (java.base@17.0.8)
 124:             1             32  [Ljava.lang.module.ModuleDescriptor$Requires$Modifier; (java.base@17.0.8)
 125:             1             32  [Ljdk.internal.module.ServicesCatalog; (java.base@17.0.8)
 126:             1             32  java.io.File (java.base@17.0.8)
 127:             1             32  java.io.FileInputStream (java.base@17.0.8)
 128:             1             32  java.io.UnixFileSystem (java.base@17.0.8)
 129:             2             32  java.lang.Boolean (java.base@17.0.8)
 130:             1             32  java.lang.Module$ArchivedData (java.base@17.0.8)
 131:             2             32  java.lang.ThreadLocal (java.base@17.0.8)
 132:             1             32  java.lang.module.ModuleDescriptor$Version (java.base@17.0.8)
 133:             2             32  java.nio.ByteOrder (java.base@17.0.8)
 134:             1             32  java.util.Collections$UnmodifiableMap (java.base@17.0.8)
 135:             2             32  java.util.concurrent.atomic.AtomicInteger (java.base@17.0.8)
 136:             1             32  jdk.internal.loader.ArchivedClassLoaders (java.base@17.0.8)
 137:             1             32  jdk.internal.module.ArchivedModuleGraph (java.base@17.0.8)
 138:             1             32  sun.util.locale.BaseLocale$Key (java.base@17.0.8)
 139:             1             24  [Ljava.io.File$PathStatus; (java.base@17.0.8)
 140:             1             24  [Ljava.lang.reflect.Method; (java.base@17.0.8)
 141:             1             24  [Ljava.net.URL; (java.base@17.0.8)
 142:             1             24  [Ljava.util.jar.Manifest; (java.base@17.0.8)
 143:             1             24  java.lang.NamedPackage (java.base@17.0.8)
 144:             1             24  java.lang.RuntimePermission (java.base@17.0.8)
 145:             1             24  java.lang.StringBuilder (java.base@17.0.8)
 146:             1             24  java.lang.reflect.ReflectPermission (java.base@17.0.8)
 147:             1             24  java.security.BasicPermissionCollection (java.base@17.0.8)
 148:             1             24  java.security.Permissions (java.base@17.0.8)
 149:             1             24  java.util.Collections$EmptyMap (java.base@17.0.8)
 150:             1             24  java.util.Collections$SetFromMap (java.base@17.0.8)
 151:             1             24  java.util.Locale$Cache (java.base@17.0.8)
 152:             1             24  java.util.concurrent.atomic.AtomicLong (java.base@17.0.8)
 153:             1             24  jdk.internal.loader.URLClassPath$FileLoader (java.base@17.0.8)
 154:             1             24  jdk.internal.module.ModuleHashes (java.base@17.0.8)
 155:             1             24  jdk.internal.module.SystemModuleFinders$SystemModuleFinder (java.base@17.0.8)
 156:             1             24  jdk.internal.ref.CleanerImpl (java.base@17.0.8)
 157:             1             24  sun.nio.cs.StandardCharsets (java.base@17.0.8)
 158:             1             24  sun.nio.cs.UTF_8 (java.base@17.0.8)
 159:             1             24  sun.security.util.LazyCodeSourcePermissionCollection (java.base@17.0.8)
 160:             1             24  sun.util.locale.BaseLocale$Cache (java.base@17.0.8)
 161:             1             16  [Ljava.lang.Throwable; (java.base@17.0.8)
 162:             1             16  [Ljava.security.cert.Certificate; (java.base@17.0.8)
 163:             1             16  MemoryLeakExample$DataProcessor
 164:             1             16  java.io.FileDescriptor$1 (java.base@17.0.8)
 165:             1             16  java.lang.CharacterDataLatin1 (java.base@17.0.8)
 166:             1             16  java.lang.Runtime (java.base@17.0.8)
 167:             1             16  java.lang.String$CaseInsensitiveComparator (java.base@17.0.8)
 168:             1             16  java.lang.System$2 (java.base@17.0.8)
 169:             1             16  java.lang.Terminator$1 (java.base@17.0.8)
 170:             1             16  java.lang.invoke.MemberName$Factory (java.base@17.0.8)
 171:             1             16  java.lang.invoke.StringConcatFactory$1 (java.base@17.0.8)
 172:             1             16  java.lang.invoke.StringConcatFactory$2 (java.base@17.0.8)
 173:             1             16  java.lang.invoke.StringConcatFactory$3 (java.base@17.0.8)
 174:             1             16  java.lang.module.ModuleDescriptor$1 (java.base@17.0.8)
 175:             1             16  java.lang.ref.Cleaner (java.base@17.0.8)
 176:             1             16  java.lang.ref.Cleaner$1 (java.base@17.0.8)
 177:             1             16  java.lang.ref.Reference$1 (java.base@17.0.8)
 178:             1             16  java.lang.reflect.ReflectAccess (java.base@17.0.8)
 179:             1             16  java.net.URI$1 (java.base@17.0.8)
 180:             1             16  java.net.URL$3 (java.base@17.0.8)
 181:             1             16  java.net.URL$DefaultFactory (java.base@17.0.8)
 182:             1             16  java.nio.Buffer$1 (java.base@17.0.8)
 183:             1             16  java.security.ProtectionDomain$JavaSecurityAccessImpl (java.base@17.0.8)
 184:             1             16  java.security.SecureClassLoader$CodeSourceKey (java.base@17.0.8)
 185:             1             16  java.util.Collections$EmptyList (java.base@17.0.8)
 186:             1             16  java.util.Collections$EmptySet (java.base@17.0.8)
 187:             1             16  java.util.HashMap$EntrySet (java.base@17.0.8)
 188:             1             16  java.util.Optional (java.base@17.0.8)
 189:             1             16  java.util.WeakHashMap$KeySet (java.base@17.0.8)
 190:             1             16  jdk.internal.misc.ScopedMemoryAccess (java.base@17.0.8)
 191:             1             16  jdk.internal.misc.Unsafe (java.base@17.0.8)
 192:             1             16  jdk.internal.module.ArchivedBootLayer (java.base@17.0.8)
 193:             1             16  jdk.internal.module.ModuleLoaderMap$Mapper (java.base@17.0.8)
 194:             1             16  jdk.internal.module.ModulePatcher (java.base@17.0.8)
 195:             1             16  jdk.internal.module.ModuleTarget (java.base@17.0.8)
 196:             1             16  jdk.internal.reflect.ReflectionFactory (java.base@17.0.8)
 197:             1             16  sun.net.www.protocol.file.Handler (java.base@17.0.8)
Total         29036       47290376

3.7.3.2.第二次
jcmd {pid} GC.class_histogram
3195:
 num     #instances         #bytes  class name (module)
-------------------------------------------------------
   1:         15811       82597008  [B (java.base@17.0.8)
   2:          7710         185040  java.lang.String (java.base@17.0.8)
   3:          1428         177896  java.lang.Class (java.base@17.0.8)
   4:           879         129840  [Ljava.lang.Object; (java.base@17.0.8)
   5:             6          33016  [C (java.base@17.0.8)
   6:           998          31936  java.util.HashMap$Node (java.base@17.0.8)
   7:           467          30904  [I (java.base@17.0.8)
   8:           905          28960  java.util.concurrent.ConcurrentHashMap$Node (java.base@17.0.8)
   9:           257          23696  [Ljava.util.HashMap$Node; (java.base@17.0.8)
  10:            19          19312  [Ljava.util.concurrent.ConcurrentHashMap$Node; (java.base@17.0.8)
  11:           259          12432  java.util.HashMap (java.base@17.0.8)
  12:           341          10912  jdk.internal.math.FDBigInteger (java.base@17.0.8)
  13:           362           8688  java.lang.module.ModuleDescriptor$Exports (java.base@17.0.8)
  14:           256           6144  java.lang.Long (java.base@17.0.8)
  15:           248           5952  java.util.ImmutableCollections$Set12 (java.base@17.0.8)
  16:            62           4960  java.net.URI (java.base@17.0.8)
  17:           132           4224  java.lang.module.ModuleDescriptor$Requires (java.base@17.0.8)
  18:           256           4096  java.lang.Byte (java.base@17.0.8)
  19:           256           4096  java.lang.Integer (java.base@17.0.8)
  20:           256           4096  java.lang.Short (java.base@17.0.8)
  21:            62           3968  java.lang.module.ModuleDescriptor (java.base@17.0.8)
  22:            68           3808  java.lang.Module (java.base@17.0.8)
  23:            10           3680  java.lang.Thread (java.base@17.0.8)
  24:            62           3472  jdk.internal.module.ModuleReferenceImpl (java.base@17.0.8)
  25:           137           3288  java.util.ImmutableCollections$SetN (java.base@17.0.8)
  26:           196           3136  java.util.HashSet (java.base@17.0.8)
  27:            39           2496  java.util.concurrent.ConcurrentHashMap (java.base@17.0.8)
  28:           128           2048  java.lang.Character (java.base@17.0.8)
  29:            61           1952  jdk.internal.loader.BuiltinClassLoader$LoadedModule (java.base@17.0.8)
  30:             7           1864  [J (java.base@17.0.8)
  31:            62           1488  java.lang.module.ResolvedModule (java.base@17.0.8)
  32:            62           1488  jdk.internal.module.ServicesCatalog$ServiceProvider (java.base@17.0.8)
  33:            62           1488  jdk.internal.module.SystemModuleFinders$2 (java.base@17.0.8)
  34:            60           1440  java.lang.module.ModuleDescriptor$Provides (java.base@17.0.8)
  35:             1           1376  [Ljdk.internal.math.FDBigInteger; (java.base@17.0.8)
  36:            50           1200  java.util.ImmutableCollections$List12 (java.base@17.0.8)
  37:            72           1152  java.lang.Object (java.base@17.0.8)
  38:             1           1040  [Ljava.lang.Byte; (java.base@17.0.8)
  39:             1           1040  [Ljava.lang.Integer; (java.base@17.0.8)
  40:             1           1040  [Ljava.lang.Long; (java.base@17.0.8)
  41:             1           1040  [Ljava.lang.Short; (java.base@17.0.8)
  42:            24            960  java.io.ObjectStreamField (java.base@17.0.8)
  43:            60            960  jdk.internal.module.SystemModuleFinders$3 (java.base@17.0.8)
  44:            12            864  java.lang.reflect.Field (java.base@17.0.8)
  45:            30            720  java.util.concurrent.CopyOnWriteArrayList (java.base@17.0.8)
  46:            20            640  java.util.Locale (java.base@17.0.8)
  47:            20            640  sun.util.locale.BaseLocale (java.base@17.0.8)
  48:            26            624  java.util.jar.Attributes$Name (java.base@17.0.8)
  49:             1            528  [Ljava.lang.Character; (java.base@17.0.8)
  50:            13            520  java.security.AccessControlContext (java.base@17.0.8)
  51:             6            480  [S (java.base@17.0.8)
  52:            12            480  java.lang.OutOfMemoryError (java.base@17.0.8)
  53:             1            376  java.lang.ref.Finalizer$FinalizerThread (java.base@17.0.8)
  54:             1            376  jdk.internal.misc.InnocuousThread (java.base@17.0.8)
  55:             1            368  java.lang.ref.Reference$ReferenceHandler (java.base@17.0.8)
  56:            14            336  java.util.ImmutableCollections$ListN (java.base@17.0.8)
  57:             8            240  [Ljava.io.ObjectStreamField; (java.base@17.0.8)
  58:             7            224  java.util.Hashtable$Entry (java.base@17.0.8)
  59:             9            216  java.util.ArrayList (java.base@17.0.8)
  60:             5            200  java.security.ProtectionDomain (java.base@17.0.8)
  61:             5            200  java.util.WeakHashMap$Entry (java.base@17.0.8)
  62:             6            192  java.lang.ref.ReferenceQueue (java.base@17.0.8)
  63:             4            160  java.security.CodeSource (java.base@17.0.8)
  64:             5            160  java.util.ImmutableCollections$MapN (java.base@17.0.8)
  65:             5            144  [Ljava.lang.String; (java.base@17.0.8)
  66:             3            144  java.lang.ThreadGroup (java.base@17.0.8)
  67:             6            144  java.lang.module.ModuleDescriptor$Requires$Modifier (java.base@17.0.8)
  68:             3            144  java.util.Hashtable (java.base@17.0.8)
  69:             3            128  [Ljava.util.Hashtable$Entry; (java.base@17.0.8)
  70:             2            128  java.lang.Class$ReflectionData (java.base@17.0.8)
  71:             8            128  java.lang.ref.ReferenceQueue$Lock (java.base@17.0.8)
  72:             4            128  jdk.internal.loader.NativeLibraries (java.base@17.0.8)
  73:             3            120  java.io.FileDescriptor (java.base@17.0.8)
  74:             3            120  java.lang.ref.SoftReference (java.base@17.0.8)
  75:             3            112  [Ljava.lang.Thread; (java.base@17.0.8)
  76:             2            112  [Ljava.lang.invoke.MethodHandle; (java.base@17.0.8)
  77:             2            112  java.nio.HeapByteBuffer (java.base@17.0.8)
  78:             1            104  jdk.internal.loader.ClassLoaders$AppClassLoader (java.base@17.0.8)
  79:             1            104  jdk.internal.loader.ClassLoaders$BootClassLoader (java.base@17.0.8)
  80:             1            104  jdk.internal.loader.ClassLoaders$PlatformClassLoader (java.base@17.0.8)
  81:             1             96  [Lsun.util.locale.BaseLocale; (java.base@17.0.8)
  82:             3             96  java.lang.invoke.MethodHandles$Lookup (java.base@17.0.8)
  83:             4             96  java.lang.module.ModuleDescriptor$Opens (java.base@17.0.8)
  84:             2             96  sun.nio.cs.StreamEncoder (java.base@17.0.8)
  85:             2             96  sun.nio.cs.UTF_8$Encoder (java.base@17.0.8)
  86:             1             88  java.lang.reflect.Method (java.base@17.0.8)
  87:             2             80  [Ljava.lang.OutOfMemoryError; (java.base@17.0.8)
  88:             5             80  [Ljava.security.Principal; (java.base@17.0.8)
  89:             1             80  [Ljava.util.WeakHashMap$Entry; (java.base@17.0.8)
  90:             2             80  java.io.BufferedWriter (java.base@17.0.8)
  91:             2             80  java.io.PrintStream (java.base@17.0.8)
  92:             2             80  java.lang.IllegalArgumentException (java.base@17.0.8)
  93:             2             80  java.lang.ModuleLayer (java.base@17.0.8)
  94:             2             80  java.lang.module.Configuration (java.base@17.0.8)
  95:             5             80  java.security.ProtectionDomain$Key (java.base@17.0.8)
  96:             2             80  sun.util.locale.LocaleObjectCache$CacheEntry (java.base@17.0.8)
  97:             3             72  jdk.internal.misc.Signal (java.base@17.0.8)
  98:             1             64  [Ljava.lang.reflect.Field; (java.base@17.0.8)
  99:             2             64  java.io.BufferedOutputStream (java.base@17.0.8)
 100:             2             64  java.io.FileOutputStream (java.base@17.0.8)
 101:             2             64  java.lang.ref.ReferenceQueue$Null (java.base@17.0.8)
 102:             1             64  java.net.URL (java.base@17.0.8)
 103:             2             64  java.util.HexFormat (java.base@17.0.8)
 104:             3             56  [Ljava.lang.Class; (java.base@17.0.8)
 105:             1             56  java.util.Properties (java.base@17.0.8)
 106:             2             48  [Ljava.security.ProtectionDomain; (java.base@17.0.8)
 107:             2             48  java.io.File$PathStatus (java.base@17.0.8)
 108:             2             48  java.io.OutputStreamWriter (java.base@17.0.8)
 109:             1             48  java.lang.NullPointerException (java.base@17.0.8)
 110:             3             48  java.nio.charset.CodingErrorAction (java.base@17.0.8)
 111:             2             48  java.util.ArrayDeque (java.base@17.0.8)
 112:             1             48  java.util.WeakHashMap (java.base@17.0.8)
 113:             3             48  jdk.internal.loader.ClassLoaderValue (java.base@17.0.8)
 114:             2             48  jdk.internal.misc.Signal$NativeHandler (java.base@17.0.8)
 115:             3             48  jdk.internal.module.ServicesCatalog (java.base@17.0.8)
 116:             1             48  jdk.internal.ref.CleanerImpl$PhantomCleanableRef (java.base@17.0.8)
 117:             1             40  java.io.BufferedInputStream (java.base@17.0.8)
 118:             1             40  java.lang.ArithmeticException (java.base@17.0.8)
 119:             1             40  java.lang.VirtualMachineError (java.base@17.0.8)
 120:             1             40  jdk.internal.loader.URLClassPath (java.base@17.0.8)
 121:             1             40  jdk.internal.ref.CleanerImpl$CleanerCleanable (java.base@17.0.8)
 122:             2             32  [Ljava.lang.StackTraceElement; (java.base@17.0.8)
 123:             1             32  [Ljava.lang.ThreadGroup; (java.base@17.0.8)
 124:             1             32  [Ljava.lang.module.ModuleDescriptor$Requires$Modifier; (java.base@17.0.8)
 125:             1             32  [Ljdk.internal.module.ServicesCatalog; (java.base@17.0.8)
 126:             1             32  java.io.File (java.base@17.0.8)
 127:             1             32  java.io.FileInputStream (java.base@17.0.8)
 128:             1             32  java.io.UnixFileSystem (java.base@17.0.8)
 129:             2             32  java.lang.Boolean (java.base@17.0.8)
 130:             1             32  java.lang.Module$ArchivedData (java.base@17.0.8)
 131:             2             32  java.lang.ThreadLocal (java.base@17.0.8)
 132:             1             32  java.lang.module.ModuleDescriptor$Version (java.base@17.0.8)
 133:             2             32  java.nio.ByteOrder (java.base@17.0.8)
 134:             1             32  java.util.Collections$UnmodifiableMap (java.base@17.0.8)
 135:             2             32  java.util.concurrent.atomic.AtomicInteger (java.base@17.0.8)
 136:             1             32  jdk.internal.loader.ArchivedClassLoaders (java.base@17.0.8)
 137:             1             32  jdk.internal.module.ArchivedModuleGraph (java.base@17.0.8)
 138:             1             32  sun.util.locale.BaseLocale$Key (java.base@17.0.8)
 139:             1             24  [Ljava.io.File$PathStatus; (java.base@17.0.8)
 140:             1             24  [Ljava.lang.reflect.Method; (java.base@17.0.8)
 141:             1             24  [Ljava.net.URL; (java.base@17.0.8)
 142:             1             24  [Ljava.util.jar.Manifest; (java.base@17.0.8)
 143:             1             24  java.lang.NamedPackage (java.base@17.0.8)
 144:             1             24  java.lang.RuntimePermission (java.base@17.0.8)
 145:             1             24  java.lang.StringBuilder (java.base@17.0.8)
 146:             1             24  java.lang.reflect.ReflectPermission (java.base@17.0.8)
 147:             1             24  java.security.BasicPermissionCollection (java.base@17.0.8)
 148:             1             24  java.security.Permissions (java.base@17.0.8)
 149:             1             24  java.util.Collections$EmptyMap (java.base@17.0.8)
 150:             1             24  java.util.Collections$SetFromMap (java.base@17.0.8)
 151:             1             24  java.util.Locale$Cache (java.base@17.0.8)
 152:             1             24  java.util.concurrent.atomic.AtomicLong (java.base@17.0.8)
 153:             1             24  jdk.internal.loader.URLClassPath$FileLoader (java.base@17.0.8)
 154:             1             24  jdk.internal.module.ModuleHashes (java.base@17.0.8)
 155:             1             24  jdk.internal.module.SystemModuleFinders$SystemModuleFinder (java.base@17.0.8)
 156:             1             24  jdk.internal.ref.CleanerImpl (java.base@17.0.8)
 157:             1             24  sun.nio.cs.StandardCharsets (java.base@17.0.8)
 158:             1             24  sun.nio.cs.UTF_8 (java.base@17.0.8)
 159:             1             24  sun.security.util.LazyCodeSourcePermissionCollection (java.base@17.0.8)
 160:             1             24  sun.util.locale.BaseLocale$Cache (java.base@17.0.8)
 161:             1             16  [Ljava.lang.Throwable; (java.base@17.0.8)
 162:             1             16  [Ljava.security.cert.Certificate; (java.base@17.0.8)
 163:             1             16  MemoryLeakExample$DataProcessor
 164:             1             16  java.io.FileDescriptor$1 (java.base@17.0.8)
 165:             1             16  java.lang.CharacterDataLatin1 (java.base@17.0.8)
 166:             1             16  java.lang.Runtime (java.base@17.0.8)
 167:             1             16  java.lang.String$CaseInsensitiveComparator (java.base@17.0.8)
 168:             1             16  java.lang.System$2 (java.base@17.0.8)
 169:             1             16  java.lang.Terminator$1 (java.base@17.0.8)
 170:             1             16  java.lang.invoke.MemberName$Factory (java.base@17.0.8)
 171:             1             16  java.lang.invoke.StringConcatFactory$1 (java.base@17.0.8)
 172:             1             16  java.lang.invoke.StringConcatFactory$2 (java.base@17.0.8)
 173:             1             16  java.lang.invoke.StringConcatFactory$3 (java.base@17.0.8)
 174:             1             16  java.lang.module.ModuleDescriptor$1 (java.base@17.0.8)
 175:             1             16  java.lang.ref.Cleaner (java.base@17.0.8)
 176:             1             16  java.lang.ref.Cleaner$1 (java.base@17.0.8)
 177:             1             16  java.lang.ref.Reference$1 (java.base@17.0.8)
 178:             1             16  java.lang.reflect.ReflectAccess (java.base@17.0.8)
 179:             1             16  java.net.URI$1 (java.base@17.0.8)
 180:             1             16  java.net.URL$3 (java.base@17.0.8)
 181:             1             16  java.net.URL$DefaultFactory (java.base@17.0.8)
 182:             1             16  java.nio.Buffer$1 (java.base@17.0.8)
 183:             1             16  java.security.ProtectionDomain$JavaSecurityAccessImpl (java.base@17.0.8)
 184:             1             16  java.security.SecureClassLoader$CodeSourceKey (java.base@17.0.8)
 185:             1             16  java.util.Collections$EmptyList (java.base@17.0.8)
 186:             1             16  java.util.Collections$EmptySet (java.base@17.0.8)
 187:             1             16  java.util.HashMap$EntrySet (java.base@17.0.8)
 188:             1             16  java.util.Optional (java.base@17.0.8)
 189:             1             16  java.util.WeakHashMap$KeySet (java.base@17.0.8)
 190:             1             16  jdk.internal.misc.ScopedMemoryAccess (java.base@17.0.8)
 191:             1             16  jdk.internal.misc.Unsafe (java.base@17.0.8)
 192:             1             16  jdk.internal.module.ArchivedBootLayer (java.base@17.0.8)
 193:             1             16  jdk.internal.module.ModuleLoaderMap$Mapper (java.base@17.0.8)
 194:             1             16  jdk.internal.module.ModulePatcher (java.base@17.0.8)
 195:             1             16  jdk.internal.module.ModuleTarget (java.base@17.0.8)
 196:             1             16  jdk.internal.reflect.ReflectionFactory (java.base@17.0.8)
 197:             1             16  sun.net.www.protocol.file.Handler (java.base@17.0.8)
Total         32554       83383480

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1676641.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

单调栈练习

最大矩形面积 如果栈为空&#xff0c;或者新的元素是大于栈顶元素的&#xff0c;那么新来的元素不会破坏栈的单调性&#xff0c;那么就把这个柱子入栈。 特别注意&#xff1a;这里的s.empty()和s.top().height < a不能调换顺序&#xff0c;包括后面的判断也要先判断栈是否为…

分析 vs2019 cpp20 规范的 STL 库模板 function ,源码注释并探讨几个问题

&#xff08;1 探讨一&#xff09;第一个尝试弄清的问题是父类模板与子类模板的模板参数的对应关系&#xff0c;如下图&#xff1a; 我们要弄清的问题是创建 function 对象时&#xff0c;传递的模板参数 _Fty , 传递到其父类 _Func_class 中时 &#xff0c;父类的模板参数 _Ret…

QT状态机4-使用并行状态来避免组合爆炸

#include "MainWindow.h" #include "ui_MainWindow.h"MainWindow::MainWindow(QWidget *parent):

基于EKF扩展卡尔曼滤波的一阶环形倒立摆控制系统simulink建模与仿真

目录 1.课题概述 2.系统仿真结果 3.核心程序与模型 4.系统原理简介 5.完整工程文件 1.课题概述 基于EKF扩展卡尔曼滤波的一阶环形倒立摆控制系统simulink建模与仿真。基于扩展卡尔曼滤波&#xff08;Extended Kalman Filter, EKF&#xff09;的一阶环形倒立摆控制系统&…

分布式搜索-elaticsearch基础 安装es

这里是在虚拟机的Linux系统里安装es的教程: 1.创建网络 在Finashell终端输入指令 docker network create es-net 2.将es.tar安装包放入tmp的目录下 输入指令加载镜像&#xff1a;docker load -i es.tar 3.再运行docker 命令 docker run -d \--name es \-e "ES_JAVA_O…

NVM安装及VUE创建项目的N种方式

VUE 参考官网&#xff1a;https://cli.vuejs.org/zh/guide/ NVM安装 我们开发过程中常常遇到nodejs版本不适配的问题&#xff0c;需要切换到不同版本的nodejs&#xff0c;nodejs卸载安装麻烦&#xff0c;这就需要用到nvm了。 nvm 全名 node.js version management 顾名思义是…

基于SVPWM的飞轮控制系统的simulink建模与仿真

目录 1.课题概述 2.系统仿真结果 3.核心程序与模型 4.系统原理简介 5.完整工程文件 1.课题概述 基于SVPWM的飞轮控制系统的simulink建模与仿真。SVPWM的核心思想是将逆变器输出的三相电压矢量在两相静止坐标系&#xff08;αβ坐标系&#xff09;中表示&#xff0c;通过控…

苹果智能戒指新专利,用于与VR头显或Vision Pro配合使用

近日&#xff0c;美国专利商标局向苹果公司授予了一项新专利&#xff0c;该专利涉及一种可扩展的智能戒指配件。最新的专利指出&#xff0c;该配件专门用于与VR头显或Vision Pro配合使用&#xff0c;这比戴VR手套更准确&#xff0c;用户可以根据应用场景佩戴一个或多个戒指。 …

一本书打通SLAM在智能汽车/自动驾驶领域应用

自动驾驶技术已成为当今数字化时代汽车行业的热点话题之一。随着技术的不断成熟&#xff0c;越来越多的车辆采用激光SLAM&#xff08;即时定位与地图构建&#xff09;和视觉SLAM技术&#xff0c;实现更高层次的智能网联汽车。SLAM技术在智能网联汽车中的应用是非常重要的&#…

数据结构——01-抽奖数人-链表-实验题目与解答

数据结构抽奖数人链表实验题目与解答 一、**实验题目** 抽奖游戏&#xff1a; n个人围成一圈&#xff0c;由第一个人开始&#xff0c;依次报数&#xff0c;数到第m人&#xff0c;便抽出来作为中奖人&#xff0c;然后从他的下一个人数起&#xff0c;数到第m人&#xff0c;再抽…

免费思维13招之十一:利润型思维

免费思维13招之十一:利润型思维 免费思维的另一大战略思维——利润型思维。 什么是利润型思维呢?就是用后期的利润来支付现在的成本。也就是“花未来的钱,办现在的事”。 我们在销售自己的产品时候,最容易犯的一个件事,就是降价,我们先来看一个案例: 前几年,有一个卖…

2025CISP深圳国际体育展引领运动潮流,展中国体育辉煌

2025CISP深圳国际体育展将于2月27日至3月1日在深圳福田会展中心举行&#xff0c;参展企业超300家&#xff0c;展览规模达20000平方米&#xff0c;参展企业数量、品牌和产品品类均创历史新高。现场汇集了全球最前沿的体育用品&#xff0c;成为体育产业的风向标。无论你是体育爱好…

ubuntu20.04 ROS 环境下使用速腾80线激光雷达

1.相关系统环境 系统版本:ubuntu 20.04 ROS版本&#xff1a;ROS1 - noetic 激光雷达型号&#xff1a;RoboSense Ruby &#xff08;更新于2024.5.14&#xff09; 2.网口配置&#xff1a; 将PC/工控机的网口配置为&#xff1a; ipv4&#xff0c;方式设置为手动 ip地址、掩码以…

WD—C++课前作业—30题

怎么会手和脚都在桌子上 目录 31&#xff0c;声明一个类 String,其数据成员为 char head[100],构造函数 String(char*Head)实现 head 的初始化&#xff0c;成员函数 void reverse()实现 head 内字符串的逆序存放&#xff0c;成员函数 void print()实现 head 内字符串的输出。…

【LAMMPS学习】九、LAMMPS脚本 示例

9. 示例脚本 LAMMPS 发行版包含一个包含许多示例问题的示例子目录。许多是二维模型&#xff0c;运行速度快且易于可视化&#xff0c;在台式机上运行最多需要几分钟。每个问题都有一个输入脚本 (in.*)&#xff0c;并在运行时生成一个日志文件 (log.*)。有些使用初始坐标的数据文…

Scrapy爬虫:利用代理服务器爬取热门网站数据

在当今数字化时代&#xff0c;互联网上充斥着大量宝贵的数据资源&#xff0c;而爬虫技术作为一种高效获取网络数据的方式&#xff0c;受到了广泛的关注和应用。本文将介绍如何使用Scrapy爬虫框架&#xff0c;结合代理服务器&#xff0c;实现对热门网站数据的高效爬取&#xff0…

Spring Cloud系列—Spring Cloud Gateway服务网关的部署与使用指南

Gateway网关 文章目录 Gateway网关1. 网关基本简介1.1 什么是网关1.2 为什么需要网关&#xff1f; 2. 快速搭建gateway网关2.1 创建新模块2.2 引入依赖2.3 编写启动类2.4 配置路由规则2.5 测试 3. 路由过滤4. 过滤器4.1 简介4.2 网关过滤器4.2.2 种类 4.3 自定义过滤器4.3.1 自…

能播放SWF文件的FlashPlayer播放器

问题&#xff1a; 你是不是遇到了 flash 动画 放不了了&#xff1f; 以前的flash游戏玩不了了 在网上很难找到好用的&#xff0c;免费Flashplayer播放器&#xff0c; 找到的也没法保存.exe 以前买的课件放不了了 一打开就更新提示&#xff1a; 再不就是意外能打开了但【创建…

50. UE5 RPG FGameplayEffectContext

接下来&#xff0c;我想实现处理完伤害时&#xff0c;将伤害的触发格挡或者触发暴击时的逻辑传递到数据集的PostGameplayEffectExecute里面&#xff0c;这样&#xff0c;在处理IncomingDamage时&#xff0c;我们可以通过释放触发格挡或者触发暴击在UI上面进行对应的效果表现。 …

Ubuntu环境搭建与共享文件

vmtool 然后依次执行以下指令 sudo apt-get update 更新包列表。访问系统的软件仓库源,检查所有已知软件包的最新版本,并更新本地数据库,使得可以安装或升级到最新的软件版本。sudo apt-get upgrade 升级所有已安装的软件包到它们的最新版本。这不包括新安装的软件包,仅限…