Why creativity needs a great feedback culture

We think there is little more important for creative work than an open, honest feedback environment. We’d like to share why — and how we deal with it. Establishing and maintaining a culture of…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




HEAP MEMORY EXPLAINED

So what is HEAP MEMORY ?
Heap Memory is the part of JVM Memory where all the class instances are assigned memory.
That is whenever you create a object in your code that object is stored in heap memory.

Why understanding HEAP MEMORY is Important
If your code tries to use more heap memory than what is initially allocated as maximum heap memory for JVM then an out of memory exception is thrown which will result in unwanted shutdown of your jvm.

Heap Memory Allocation:-
Heap memory is allocated to the jvm when a jvm is created.
By default the maximum heap memory assigned to a jvm is 64 Mb .
The -server tag increases the default heap memory to 128 Mb.
-Xms defines the initial heap memory to be allocated to the jvm.
-Xmx defines the maximum heap memory to be allocated to the jvm.

Heap Memory Usage:
Heap memory consists of two type of objects
Live Objects : The objects which are currently being used by the jvm ,i.e., the object is within its scope.
Dead Objects: These are the objects which are now not in their scope and are of no more use to jvm.
These objects are removed from heap memory by garbage collector.

Conclusion:
Any java developer who are going to use their java application in production environment , they should consider how much heap should be provided , how their heap usage is distributed.
If there is any outofMemory error then where to look . I will soon write about how to analyze heap memory distribution.

Thanks and feel free to comment and ask for any doubt.

Add a comment

Related posts:

Philadelphia Dentist Babiner Dental Makes Brushing Teeth a Breeze

First you have to get the outsides AND insides of your canines and incisors. Then you have to get the outsides, insides, AND top sides of your molars and premolars. Oh, and don’t forget that…

Sweet Bloom

This coffee is not about being serious. It doesn’t care that there is a global pandemic. If this coffee was a human, it would be a stand up comedian, the life of the party, the one you can’t get…

AWAKE Program Offering Support to Domestic Violence Victims

R.W. Sullivan Engineering, a family business based in Boston, Massachusetts, is a leading provider of mechanical, plumbing, electrical, tel-data design services, building and access code consulting…