此程序是按照设定量每次定量统计数据,当执行一定次数后报内存不足
报错内容
#
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007ff60d6d9000, 262144, 0) failed; error='Cannot allocate memory' (errno=12)
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007ff855f03000, 65536, 1) failed; error='Cannot allocate memory' (errno=12)
[thread 140703030978304 also had an error]
通过free -h 查看内存使用率很低
total used free shared buff/cache available
Mem: 31G 4.4G 25G 699M 1.4G 25G
Swap: 5.0G 0B 5.0G
这个问题应该通过什么方法来解决
加个内存条,容量太小,不能优化
内存不够用,加内存。