I have rasters in my program of approximately 1500x500 pixels. Each pixel is represented with a float. I believe that means that 1500x500x4(bytes) = 3 million bytes or 3mb. They can be bigger than this. Does the Java Garbage Collector treat big objects differently than smaller ones? Do they skip into a higher generation automatically?
解决方案
Larger objects can be placed straight into tenured space. The size of the individual objects is what matters e.g. float[1500][1500] is 1500 objects which are 1500*4 (plus overhead) each.
This suggest JRockit does place large objects into tenured space but doesn't say anything about HotSpot.
This suggests large objects have to be larger than the young generation space to go directly into tenured space.