+2  A: 

No, the program heap is different from the heap data structure. In other words, no relation. This question discusses the program heap in detail.

Amit Kumar
Thanks for the quick response. Any idea on why it uses the same name then? Just a coincidence or some historical meaning?
John Doe
@John Doe: These two things use the same name for the same reason your handle ("John Doe") is so common.
S.Lott
@S.Lott: Point taken :P@Amit Kumar: Great link, thanks!
John Doe
+1  A: 

There is no relation, but I admit the name can be confusing. The heap in memory is an array that the OS allocates to programs. A heap is implemented by programs for fast lookup.

Chris H
+3  A: 

Heap is a synonym for what the standard calls the free-store. In contrast to stacks, which is used for function calls, and function-local object storage, heaps grow in the opposite direction (top to bottom) on many implementations (as opposed to stacks -- which grow from bottom to top). Of course, none of these are required by the standard.

The heap data structure, on the other hand is completely different -- it is a specialized tree structure with certain properties.

It is possible some implementations use the heap data structure for free-store management, whence the name may have been derived. (See buddy memory allocation.)

dirkgently