maximum limit on Java array -


i trying create 2d array in java follows:

int[][] adjecancy = new int[96295][96295]; 

but failing following error:

jvmdump039i processing dump event "systhrow", detail "java/lang/outofmemoryerror" @ 2017/04/07 11:58:55 - please wait. jvmdump032i jvm requested system dump using 'c:\eclipse\workspaces\tryjavaproj\core.20170407.115855.7840.0001.dmp' in response event jvmdump010i system dump written c:\eclipse\workspaces\tryjavaproj\core.20170407.115855.7840.0001.dmp jvmdump032i jvm requested heap dump using 'c:\eclipse\workspaces\tryjavaproj\heapdump.20170407.115855.7840.0002.phd' in response event jvmdump010i heap dump written c:\eclipse\workspaces\tryjavaproj\heapdump.20170407.115855.7840.0002.phd 

a way solve increasing jvm memory trying submit code online coding challenge. there failing , not able change settings there.

is there standard limit or guidance creating large arrays 1 should not exceed?

int[][] adjecancy = new int[96295][96295]; 

when trying allocate 96525*96525*32 bits 37091 mb 37 gigs. highly impossible memory pc java alone.

i don't think need data in hand on initialization of program. have @ arraylist gives dynamic allocation of size , keep on freeing @ runtime key consider.

there no limit or restriction create array. long have memory, can use it. keep in mind should not hold block of memory makes jvm life hectic.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -