I wrote this code:

```
public static void main(String[] args) {
    // TODO Auto-generated method stub
    HashMap<Long,Long> mappp = new HashMap<Long, Long>(); Long a = (long)55; Long c = (long)12;
    for(int u = 1;u<=1303564/2 + 1303564/3;u++){

        mappp.put(a, c);
        a = a+1;
        c = c+1;
    }
    System.out.println(" " + mappp.size());
}

```

And it does not finish, beacause the progrm stops with the message in the console:

> 
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> 
> 
> 

I calculated how memory I need to have such HashMAp in memory and in my opinion my computer memory is enough. I have 1024 RAM on my computer.
I use eclipse. Also have set the parameters :
i am starting eclipse from the command line with this:'eclipse -vmargs -Xms512m -Xmx730m'
And second from Run Configurations i have set the tab Arguments with this:'-Xmx730m'
And this still gives java.lang.OutOfMemoryError. 
 What is the reason for this?
ps. Just to add some strange fact - in the bottom right corner of eclipse is shown the heap memory usage, and it is written 130M of 495M. 
Well, when the HashMap mappp increases in size, doesn't this info '130M of 495M' have to change,for example '357M of 495M', 1 second later to be '412M of 495M' and so on in order to reach this 495M?In my case this 130M stays the same, just a little changes, from 130M to 131M or to 132M.
Strange