Context (computing)

The context data may be located in processor registers, memory used by the task, or in control registers used by some operating systems to directly manage the task.

The storage memory (files used by a task) is not concerned by the "task context" in the case of a context switch, even if this can be stored for some uses (checkpointing).

The context can also be viewed as a mechanism that allows a state of a program to be transferred between its components.

For instance, if an array is needed inside a structure, it can be added to it since version 2.0, but only in an unsafe/unsecure context.

[1] Here is an example code: The fixed keyword prevents the garbage collector from relocating this variable.