Java large datastructure for storing a matrix

后端 未结 9 2057
北恋
北恋 2021-01-13 02:17

I need to store a 2d matrix containing zip codes and the distance in km between each one of them. My client has an application that calculates the distances which are then s

9条回答
  •  不思量自难忘°
    2021-01-13 02:50

    You will simply need more memory. When starting your Java process, kick it off like so:

    java -Xmx256M MyClass

    The -Xmx defines the max heap size, so this says the process can use up to 256 MB of memory for the heap. If you still run out, keep bumping that number up until you hit the physical limit.

提交回复
热议问题