OpenMPI
0.1.1
|
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 |
Implementation of opal_object_t, the base opal foundation class.
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.
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().
opal_class_t opal_object_t_class |