aspose file tools*
The moose likes Beginning Java and the fly likes Heap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Heap" Watch "Heap" New topic
Author

Heap

pradeepta chopra
Ranch Hand

Joined: Jul 05, 2008
Posts: 137
why the name heap for memory storing objects??
is it only a virtual heap which refers to a chunk of memory or has it anything to do with the heap-the data structure??
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39885
    
  28
As far as I know the first.
Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 504

why the name heap for memory storing objects?

First understand meaning of word Heap:- A group of things placed or thrown, one on top of the other.
memory is allocated from a large pool of unused memory area called the heap (also called the free store).
Heap Memory is a area in main memory that is used to assign dynamically allocated memory to a application. Heap is generally managed in the form of linked list and in most os allocation or delocation can be done on per byte basis or in some cases it may be 4 bytes ; since OS mostly use paged memory management so an internal fault is found. Heap memory can be manged in non movable or movable blocks which again depends on os implementations.
heap can be local as well as global ie shared among many processes. But if your process does frequent allocation and deallocation of memory it is advisable to have local heap associated with that process only...
Read following links
[Dynamic memory allocation]
[heap memory pdf book]
[For diagram of heap memory]
[How IBM use heap memory]
[Same question ask in other forum]
is it only a virtual heap which refers to a chunk of memory

Read for
Chunk of memory.


Millions saw the apple fall, but Newton asked why.
pradeepta chopra
Ranch Hand

Joined: Jul 05, 2008
Posts: 137
thankyou
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Heap