What are you doing exactly that you would need to do something like that? or are you just testing the JVM limits?
There are more than likely several different work-arounds to doing something like that. Do you really need 10 billion objects in memory all at the same time? Couldn't you read/write/execute/whatever your objects a few at a time? If this is a real problem that you need help with than please give us more details to assist you with. Increasing your system memory is not a good solution in my opinion because I can't think of a single situation in which you would have to have 10 billion objects in memory at one time.
~Currently preparing for SCJP6
Joined: Oct 13, 2005
If you need 10000000000 (= 100 crore) objects, you would do better to put them into a database. That will happily hold that many objects, assuming you have enough hard drive space.