views:

54

answers:

1

Ok so from my understanding each application normally gets 16 mb memory to work with. This is what is shown on the heap tool for eclipse:

Heap Size: 4.5 mb
Allocated: 3.2 mb
Free : 1.5 mb
Used : 66.7%

Which one is the total memory being used? Heap size, or Allocated?

+1  A: 

Well the memory allocated are the objects being created, everytime an object is created it is allocated in the heap.(as we know the memory allocated for an object is freed automatically when there is no reference for that object exist).

If the objects being created exceed the heap size, an OutofMemory Exception is raised.

R:: Allocated Memory

Jorgesys