Aloento / SuperSpineViewer

A tool to load and export Spine skel & 一个拿来加载与导出Spine骨骼的工具
Apache License 2.0
217 stars 25 forks source link

内存泄漏 #17

Closed Aloento closed 3 years ago

Aloento commented 3 years ago

1

说实话,我也不知道该咋整 JVM显示内存已经释放了 操作系统却告诉我占用了一大堆内存 怎么GC都没用

这我就没办法修了

Aloento commented 3 years ago

JVM是无参启动,都是默认的配置 Committed size 明显与操作系统分配的不符 差的太多了

Aloento commented 3 years ago

1 2 3

Aloento commented 3 years ago

在换用Pixmap之前,导出时内存占用会正常升高 但是在导出完成后内存释放,操作系统也会显示内存释放 从2G回到300mb左右

在换用颜色稳定的Pixmap后,导出时内存升高 在导出完成以后GC回收,但是操作系统内不显示内存释放 仍然占用着导出时的高内存占用

Aloento commented 3 years ago

使用的默认就是-XX:+UseG1GC 按理说G1GC应该是会归还内存给操作系统的 在用Pixmap之前也确实是这样

Aloento commented 3 years ago

默认启动参数 VM Flags: -XX:CICompilerCount=4 -XX:ConcGCThreads=3 -XX:G1ConcRefinementThreads=10 -XX:G1HeapRegionSize=2097152 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=268435456 -XX:MarkStackSize=4194304 -XX:MaxHeapSize=4269801472 -XX:MaxNewSize=2560622592 -XX:MinHeapDeltaBytes=2097152 -XX:MinHeapSize=8388608 -XX:NonNMethodCodeHeapSize=5839372 -XX:NonProfiledCodeHeapSize=122909434 -XX:ProfiledCodeHeapSize=122909434 -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:SoftMaxHeapSize=4269801472 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC -XX:-UseLargePagesIndividualAllocation