Part of the Programming glossary:

In certain programming languages including C and Pascal , a heap is an area of pre-reserved computer main storage ( memory ) that a program process can use to store data in some variable amount that won't be known until the program is running. For example, a program may accept different amounts of input from one or more users for processing and then do the processing on all the input data at once. Having a certain amount of heap storage already obtained from the operating system makes it easier for the process to manage storage and is generally faster than asking the operating system for storage every time it's needed. The process manages its allocated heap by requesting a "chunk" of the heap (called a heap block ) when needed, returning the blocks when no longer needed, and doing occasional "garbage collecting," which makes blocks available that are no longer being used and also reorganizes the available space in the heap so that it isn't being wasted in small unused pieces.

The term is apparently inspired by another term, stack . A stack is similar to a heap except that the blocks are taken out of storage in a certain order and returned in the same way. In Pascal, a subheap is a portion of a heap that is treated like a stack.

This was last updated in April 2005
Contributor(s): Eric Ringnes
Posted by: Margaret Rouse

Related Terms

Definitions

  • Java Champion

    - The Java Champion designation is awarded to leaders and visionaries in the Java technology community. (SearchSOA.com)

  • application program interface (API)

    - An application program interface (API) is code that allows two software programs to communicate with each other. Typically, APIs are released for third-party development as part of a software devel... (SearchExchange.com)

  • algorithm

    - An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem. (WhatIs.com)

Glossaries

  • Programming

    - Terms related to software programming, including definitions about programming languages and words and phrases about software design, coding, testing and debugging.

  • Internet applications

    - This WhatIs.com glossary contains terms related to Internet applications, including definitions about Software as a Service (SaaS) delivery models and words and phrases about web sites, e-commerce ...

Ask a Question. Find an Answer.Powered by ITKnowledgeExchange.com

Ask An IT Question

Get answers from your peers on your most technical challenges

Ask Question
  • Which laptop hard drive is better?

    Do you exactly know the number 5400 or 7200 that aims to mean what? You should google for a while.

  • SQL Server 2008 R2: User table with clustered indexes

    If the query is using a seek on the nonclusteredindex without any problems, then having thetable as a heap will not cause any problems. Having a clustered index is typically recommended, but is not...

  • How to highlight tasks that are behind

    Hello I am pretty,prettyshina74@yahoo.com I guess you will not surprise to receive my mail? i saw your profile and it sound well.I will like us to exchange good relationship.I am pretty by name...

Tech TalkComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.