Eclipse updating indexes java heap space
On 32-bit Solaris kernels the address space is limited to 2G.On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems.A larger heap will cause garbage collection pauses to increase because there is more heap to scan. For some applications a very large eden helps, for others it will increase the times of minor collections.For most programs, collecting eden is much faster than other generations because most objects die young.As of Java SE 6, the Windows /3GB feature is not supported. Pooling objects will cause them to live longer than necessary.If your application requires a very large heap you should use a 64-bit VM on a version of the operating system that supports 64-bit applications. The garbage collection methods will be much more efficient if you let it do the memory management. Don't call System.gc(), Hot Spot will make the determination of when its appropriate and will generally do a much better job.On the other hand, the Client VM will have a greater tendency to flush soft references rather than grow the heap.
For 1.3, Max New Size is set to 32mb on Sparc, 2.5mb on Intel based machines.Using the above as an example, you can do the following in 1.4 and later: If you are worried about the number of garbage collections, but less worried about pause times, then increasing the heap should cause the number of full garbage collections to decrease, this is especially true if you increase the size of the eden space as well.Many systems have less efficient memory management than in Hot Spot. Using object pools will fool the collector into thinking objects are live when they really aren't. Try using -Xaprof to get a profile of the allocations (objects and sizes) of your application.For most programs this results in shorter pauses, although throughput is usually worse.
Next, you might try decreasing the amount of heap used.
To work around this, some programs keep an "object pool", saving previously allocated objects in some freelist-like data structure and reusing them instead of allocating new ones. This may have worked before exact garbage collection became popular, but this is just not a good idea for any modern Java Virtual Machines. You can also try -agentlib:hprof=heap=all (or other option, try -agentlib:hprof=help for a list) Since 1.5, you can use jmap. The Java Hot Spot VM cannot expand its heap size if memory is completely allocated and no swap space is available.