Jump to content

Red zone (computing)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Bender235 (talk | contribs) at 15:05, 25 July 2016 (clean up; http->https (see this RfC) using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computing, a red zone is a fixed-size area in a function's stack frame beyond the return address which is not preserved by that function. The callee function may use the red zone for storing local variables without the extra overhead of modifying the stack pointer. This region of memory is not to be modified by interrupt/exception/signal handlers. The x86-64 ABI used by System V mandates a 128-byte red zone,[1][2] which begins directly after the return address and includes the function's arguments. The OpenRISC toolchain assumes a 128-byte red zone.[3]

Notes and references

  1. ^ "System V Application Binary Interface, AMD64 Architecture Processor Supplement" (PDF). Retrieved 2014-11-29.
  2. ^ "i386 and x86-64 Options - Using the GNU Compiler Collection (GCC)". Retrieved 2011-04-10.
  3. ^ "OpenCores Wiki - OpenRISC GNU toolchain". Retrieved 2014-05-28.