cancel
Showing results for 
Search instead for 
Did you mean: 

Heap memory

Former Member
0 Kudos

What is heap memory?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Ravi,

In Java,

the JVM's(Java virtual Machine) heap stores all objects created by an executing Java program. Memory for new objects is allocated on the heap at run time.

Try the link below for more info.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sag2/html/sag2/sag274.ht...

Cheers.......

Former Member
0 Kudos

Hi Ravichandran ,

Heap is a central memory segment that can be used for various reasons. It depends from the language that you are using.

In C, for example, you can use function that permits you to allocate part of memory inside the heap:

void* malloc(size_t n)... to allocate

In this case the programmer is responsible to manage this memory manually

void free(void*)... to deallocate

In others languages as Java, the Heap memory is used to allocate the object instances thanks to the Java Virtual Machine. So, in Java programmers can not manage the Heap manually, the object instances are deallocated automatically from the Garbage Collector.

If you need more deeply informations, please, let me know.

Hoper this help you.

Vito.