OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Functions | Variables
opal_object.c File Reference

Implementation of opal_object_t, the base opal foundation class. More...

`#include "opal_config.h"`
`#include <stdio.h>`
`#include "opal/sys/atomic.h"`
`#include "opal/class/opal_object.h"`
`#include "opal/constants.h"`

## Functions
static void | save_class (opal_class_t *cls)
static void | expand_array (void)
void | opal_class_initialize (opal_class_t *cls)
| Lazy initialization of class descriptor. More...
int | opal_class_finalize (void)
| Shut down the class system and release all memory. More...

## Variables
opal_class_t | opal_object_t_class
static opal_atomic_lock_t | class_lock = { { OPAL_ATOMIC_UNLOCKED } }
static void ** | classes = NULL
static int | num_classes = 0
static int | max_classes = 0
static const int | increment = 10

## Detailed Description

Implementation of opal_object_t, the base opal foundation class.

## Function Documentation

int opal_class_finalize | ( | void |  | ) |

Shut down the class system and release all memory.

This function should be invoked as the ABSOLUTE LAST function to use the class subsystem. It frees all associated memory with ALL classes, rendering all of them inoperable. It is here so that tools like valgrind and purify don't report still-reachable memory upon process termination.

Referenced by opal_finalize_util().

void opal_class_initialize | ( | opal_class_t * |  | ) |

Lazy initialization of class descriptor.

Specifically cache arrays of function pointers for the constructor and destructor hierarchies for this class.

Parameters

  class | Pointer to class descriptor

References opal_class_t::cls_construct, opal_class_t::cls_construct_array, opal_class_t::cls_depth, opal_class_t::cls_destruct, opal_class_t::cls_destruct_array, opal_class_t::cls_initialized, opal_class_t::cls_parent, opal_atomic_lock(), and opal_atomic_unlock().

Referenced by opal_obj_new().

## Variable Documentation

opal_class_t opal_object_t_class

Initial value:
= {
"opal_object_t",
NULL,
NULL,
NULL,
1,
0,
NULL,
NULL,
sizeof(opal_object_t)
}
opal_object_t
Base object.
Definition: opal_object.h:182