Results 1 to 2 of 2
Thread: Java heap space?
- 06-24-2008, 06:00 PM #1
Member
- Join Date
- Jun 2008
- Location
- Australia
- Posts
- 43
- Rep Power
- 0
- 06-24-2008, 06:55 PM #2
Suprisingly large.
Allocation, as you have done it, is a recurrent discussion issue that is better approached by writing a short test stub to do nothing except the allocation and just see what happens.
I wrote a program recently to test such a thing, ran through five or ten loops before the memory issue slowed things down. Start with 1024 x 64 or something, I would not think a [1024][1024] to be too far from blowout, but we have to realize that the two numerics multiply as a [][]
output:Java Code:public class HeapHog { public static void main(String[] args) { try { int[][] Flint = new int[1024][1024];// Flint = null; System.out.println("Suprisingly large"); } catch(Exception e) { System.out.println(e.getMessage()); } } }
If you find a use for a 1024 by 1024 memory space, you will be in the database forum or something. Possibly some games could use this sort of space.Java Code:Suprisingly large
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Similar Threads
-
java.lang.OutOfMemoryError: Java heap space
By paul in forum Advanced JavaReplies: 11Last Post: 06-12-2010, 05:30 PM -
Java Heap Space
By sandeeprao.techno in forum Advanced JavaReplies: 19Last Post: 10-30-2008, 11:27 AM -
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
By Eku in forum NetBeansReplies: 14Last Post: 06-12-2008, 08:36 AM -
Heap Sort in Java
By Java Tip in forum AlgorithmsReplies: 0Last Post: 04-16-2008, 10:27 PM -
Java Heap Out of Memory Error
By stonkers in forum New To JavaReplies: 3Last Post: 07-17-2007, 04:43 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks