GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / mv2304
#include <PBS/impl/MBA.h.xx-xxx-xxx>
Classes | |
struct | _MBA_badBlock |
Definition of a bad block of memory. More... | |
Typedefs | |
typedef struct _MBA_badBlock | MBA_badBlock |
Typedef for struct _MBA_badBlock. | |
typedef PART_ID(* | MBA_create_cb )(void *prm) |
Function signature for a user definition initialization routine. | |
Functions | |
void * | MBA_align (unsigned int alignment, unsigned int nBytes) |
Allocates nBytes of aligned memory. | |
void * | MBA_alloc (unsigned int nBytes) |
Allocates nBytes of at least word aligned memory. | |
int | MBA_free (void *pBlock) |
Frees a piece of memory allocated with either MBA_align() or MBA_alloc(). | |
int | MBA_statsGet (MBA_stats *stats) |
Gets the memory stats for the MBA partition. | |
int | MBA_initialize (MBA_create_cb create, void *prm) |
One time initialization of the MBA facility. |
CVS $Id: MBA.h,v 1.4 2011/03/24 23:05:42 apw Exp $
Typedef for struct _MBA_badBlock.
PART_ID(* MBA_create_cb)(void *prm) |
Function signature for a user definition initialization routine.
prm | Arbitrary user parameter |
void * MBA_align | ( | unsigned int | alignment, | |
unsigned int | nBytes | |||
) |
Allocates nBytes of aligned memory.
alignment | The alignment factor. This must be a power of 2 | |
nBytes | The number of bytes to allocate |
void * MBA_alloc | ( | unsigned int | nBytes | ) |
Allocates nBytes of at least word aligned memory.
nBytes | The number of bytes to allocate |
Referenced by TASK_create(), TASK_cvt(), and WUT_sys_init().
int MBA_free | ( | void * | pBlock | ) |
Frees a piece of memory allocated with either MBA_align() or MBA_alloc().
pBlock | Pointer to the block of memory to be freed. |
0,if | successful | |
-1,if | error |
Referenced by TASK_cvt(), TASK_join(), TASK_rvt(), and WUT_sys_shutdown().
int MBA_initialize | ( | MBA_create_cb | create, | |
void * | prm | |||
) |
One time initialization of the MBA facility.
create | User callback partition creation meant to usurp the default creation routine in an extreme emergency | |
prm | Arbitrary user parameter passed to partition creation routine. If the partition creation routine is specified as NULL, then, if this parameter is treated as a pointer to a list of bad blocks, MBA_badBlock. |
References mba_create(), and MemPartId.
Referenced by PBS_initialize2().
int MBA_statsGet | ( | MBA_stats * | stats | ) |
Gets the memory stats for the MBA partition.
stats | Pointer to the statistics block to fill |
0,if | successful | |
-1,if | error |