Cleanup stack

Cleanup stack

Cleanup Stack is a concept widely used in Symbian OS. It is most suitable to use in places where dynamic memory is used (allocated) in programming. The problem with dynamic memory is the sole discretion of the underlying OS whether the request for memory allocation shall succeed or not. Applications (Requester of memory) must be prepared to handle the rejection. In large programs dynamic memory is used almost everywhere. If an application frequently adds the code to handle this failure then it will increase the code size significantly. Symbian is used mostly on phones where this increase in the code size will further amplify the memory allocation failures. Symbian features an ingenious solution to that problem. When an application notes a memory allocation may fail, it places the earlier allocated memory address to a location which Symbian is aware of. That location is called Cleanup Stack. In the event of failure, Symbian knows that whatever resource is placed on the Cleanup Stack needs be freed. This way all the resources are freed when a program crashes (or Leaves). This freeing is performed automatically by the Symbian OS. Applications die peacefully without worrying who would clean up the mess left after them.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Symbian — This article is about the operating system. For other uses, see Symbian (disambiguation). Symbian Company / developer Accenture on behalf of Nokia [1] …   Wikipedia

  • Symbian OS — Infobox OS name = Symbian OS caption = developer = Symbian Ltd. source model = Shared kernel type = Microkernel supported platforms = ARM (can be emulatedFact|date=September 2008 on x86) ui = S60 platform, UIQ, MOAP family = Embedded operating… …   Wikipedia

  • Accredited Symbian Developer — (ASD) is an accreditation program for software developers using Symbian OS, a mobile phone operating system. The scheme is operated independently on Symbian s behalf by [http://www.majinate.com/ Majinate Limited] .The primary qualification for… …   Wikipedia

  • Magic: The Gathering rules — Magic: The Gathering is a playing and collectible card game with extremely detailed and, at times, complex rules. A very good knowledge of the game s rules is absolutely necessary to play the game. The most important rule is that if the text on a …   Wikipedia

  • Thermal power station — Republika Power Plant, a thermal power station in Pernik, Bulgaria …   Wikipedia

  • Technical features new to Windows Vista — This article is part of a series on Windows Vista New features Overview Technical and core system Security and safety Networking technologies I/O technologies Management and administration Removed features …   Wikipedia

  • Deepwater Horizon oil spill — 2010 oil spill and BP oil spill redirect here. For other oil spills in 2010, see 2010 oil spill (disambiguation). For the 2006 oil spill involving BP, see Prudhoe Bay oil spill. For the drilling rig and explosion, see Deepwater Horizon… …   Wikipedia

  • environment — environmental, adj. environmentally, adv. /en vuy reuhn meuhnt, vuy euhrn /, n. 1. the aggregate of surrounding things, conditions, or influences; surroundings; milieu. 2. Ecol. the air, water, minerals, organisms, and all other external factors… …   Universalium

  • X86 calling conventions — This article describes the calling conventions used on the x86 architecture.Calling conventions describe the interface of called code: * The order in which parameters are allocated * Where parameters are placed (pushed on the stack or placed in… …   Wikipedia

  • Windows Vista networking technologies — This article is part of a series on Windows Vista New features Overview Technical and core system Security and safety Networking technologies I/O technologies Management and administration Removed features …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”