GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBS / V2-11-0

Constituent: test_fpa     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

test_fpa.c File Reference

Unit test for the Fixed Packet Allocateor (FPA) routines. More...


Detailed Description

Unit test for the Fixed Packet Allocateor (FPA) routines.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id

The FPA routines are one of the main memory managers offered by PBS. They provide a method of managing a block of memory as a collection of fixed size blocks that can be allocated and freed in an interlocked fashion. They are meant to aid the user in implementing the all resource allocations upfront FSW policy. The user can allocate a pool of memory using the random allocator MBA_alloc() or MBA_align(), then manage that pool within a task or collection of tasks using the FPA routines.

The advantages of the FPA routines are

  1. Fast and deterministic
  2. Interlocked
  3. Fine-grain time-out support
  4. Out of order freeing allowed

In the world of memory allocators, one cannot have it all. The main feature missing is

  1. Random size allocation

The test can be run from the command line by typing

   $ test_fpa

Generated on Fri Mar 27 01:37:51 2009 by  doxygen 1.4.4