• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Heap

 
pradeepta chopra
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know the first.
 
Mandar Khire
Ranch Hand
Posts: 568
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
pradeepta chopra
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thankyou
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic