GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBS / V2-12-1 > pbs / rhel5-32
#include <stdlib.h>
Functions | |
int | MBA_initialize (MBA_create_cb create, void *prm) |
One time initialization of the MBA facility. | |
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. |
CVS $Id: MBA.c.xx-xxx-xxx,v 1.5 2005/05/12 19:42:58 russell Exp $
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 MTX__create(), SEM__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 MTX__create(), MTX__destroy(), SEM__create(), SEM__destroy(), TASK_cvt(), 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. |
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 |
References _MBA_stats::maxBlockSizeFree, _MBA_stats::numBlocksAlloc, _MBA_stats::numBlocksFree, _MBA_stats::numBytesAlloc, and _MBA_stats::numBytesFree.