Negative Free Memory

后端 未结 1 1794
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 07:35

Sometimes, this code prints a negative number, like -64. The value is in KB.

What could be happenning?


long memoriaInicial = Runtime.getRuntime().freeM         


        
相关标签:
1条回答
  • 2021-01-29 08:11

    It means after you've sorted, the garbage collector has probably freed more memory and you have more than you started out with.

    0 讨论(0)
提交回复
热议问题