Whole document tree
    

Whole document tree

Using PRC-Tools: Global data
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Global data

An application's variables can be divided into three classes according to where they are stored. Automatic variables local to functions are stored on the stack, and have lifetimes corresponding to the duration of the function invocation with which they are associated. Some data are explicitly allocated on the heap via malloc(), MemPtrNew(), or MemHandleNew(), and live until they are explicitly freed. The remainder--global and static variables--constitute an application's global data, and have lifetimes corresponding to the complete runtime of the application.

Shared libraries can also have global data: GLibs automatically have globals just as applications do, while system libraries don't by default, but could set up their own globals manually, if desired.

Currently, both C++ virtual tables and the support data for multiple code resources are stored as global data. This means that these features can only be used when global data is available.

2.1 Accessing global data  How to access global data
2.2 Initialising A4  Initialising a non-standard global pointer
2.3 The extralogue attribute and entry points  Using extralogue attributes



This document was generated by root on January, 30 2002 using texi2html