Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Traditional Memory Management

created by viterbiSearcher

(idea) by viterbiSearcher (7.2 mon) (print)   ?   (I like it!) 1 C! Tue May 02 2000 at 20:13:00

In Traditional Memory Management (as opposed to Garbage-Collection) memory is divided into three main areas: global data, the stack, and the heap. The Global Data area is a collection global variables, it is of constant size and globally visible throughout the program's execution. The Stack contains a series of Stack Frames, each representing a function scope. Both of these areas contain references, called Roots, into the Heap which holds Objects. Objects are memory regions used for application dependent purposes and may contain arbitrary data including pointers.

Objects on the heap are generally allocated and de-allocated explicitly, an application must be able to detect when a Object is no longer needed so that it may be de-allocated and the memory reused. The structure that manages de-allocated memory waiting for re-allocation is called a Free List, though often implemented as an array of lists or a tree of some variety. Stack Frames are de-allocated when the procedure associated with them terminates.

This form of memory management has several long standing problems, which, fall into three main categories:

  • Incorrect program decisions as to whether a Object is still in use lead either to memory leaks (if unneeded Objects are kept) or to dangling pointers (if needed Objects are de-allocated). Both of these lead to catastrophic results in non-trivial programs.
  • The structure and types of Objects on the heap are highly dependent on the domain of the application and the language in which it is implemented. In general the types of Objects are not determinable by examination of the Objects themselves.
  • Allocation and de-allocation using traditional algorithms such as first-fit, binary search tree or partitioning by size can (in some circumstances) be very expensive in terms of processor time and memory accesses. Additionally, since it forces routines which operate on a Objects to be aware of other routines operating on the same chunk in order to make de-allocation decisions, traditional memory management impedes truly modular programming.

    A good review paper on memory management is: Paul R. Wilson. Uniprocessor garbage collection techniques. In Proc of International Workshop on Memory Management in the Springer-Verlag Lecture Notes in Computer Science series., St. Malo, France, September 1992.


  • printable version
    chaos

    The cool thing about the O&M building at A&M garbage collection binary search tree shortest path algorithm
    Synchronicity pointer Secret Projects in Sid Meier's Alpha Centauri Customer Response Marketing
    Heap O&M building AGP
    Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
      Epicenter
    Login
    Password

    password reminder
    register

    Everything2 Help

    Cool Staff Picks
    Drink up!
    Today your little boy is sprouting ten fingers and shedding his tail
    My body is a battlefield, and all my breasts ever do is argue about existentialism
    George Washington's Inaugural Addresses
    Everything as a second language
    mochi
    DDT
    On Seeing
    Every new technology has been endowed with the potential to transform society
    William Shakespeare
    Sealand
    Grouper and oysters and shrimp, oh my! An E2 New Year's gathering on Florida's Gulf Coast
    The truth about SUVs
    Little Penguin Fashion
    New Writeups
    Ysardo
    a brother to a sister(personal)
    antigravpussy
    your warm whispers(personal)
    Clarke
    Multiculturalism(idea)
    aneurin
    Earl of Landaff(person)
    Heitah
    Pseudocide(idea)
    XWiz
    Google Knol(lede)
    Mythi
    July 24, 2008(personal)
    locke baron
    The fall of Earth(fiction)
    BookReader
    Fear the Cold(dream)
    Pavlovna
    Kathleen MacInnes(person)
    stainedglass
    1(fiction)
    kalen
    Three "T"s(idea)
    octillion369
    Undead(idea)
    archiewood
    Ico(fiction)
    Heisenberg
    Why I love Everything2(log)
    Everything 2 is brought to you by the letter C and The Everything Development Company