cyg_mempool_fix_create
Name: cyg_mempool_fix_create ( ) - create a fixed sized memory pool
Synopsis:
void cyg_mempool_fix_create
(
  void            *base,     /* pointer to memory to use as heap */
  cyg_int32       size,      /* size of memory to use as heap    */
  cyg_int32       blocksize, /* size of blocks in fixed mempool  */
  cyg_handle_t    *handle,   /* returned handle to pool          */
  cyg_mempool_fix *fix       /* fix mempool structure            */ 
)
Description: This creates a memory pool that allows fixed size allocation of memory. Note that "size" will not necessarily be the total size of memory available once the memory pool is created since there is overhead. Fixed sized memory pools have the advantage of speed over variable sized memory pools. The newly created pool can be accessed via "handle".
Include: #include <cyg/memalloc/kapi.h>
Returns: nothing
See Also: cyg_mempool_fix_delete, cyg_mempool_fix_get_info

cyg_mempool_fix_delete
Name: cyg_mempool_fix_delete ( ) - delete a fixed sized memory pool
Synopsis:
void cyg_mempool_fix_delete
(
  cyg_handle_t fixpool /* fixed sized memory pool to delete */
)
Description: This destroys a fixed sized memory pool. Do not destroy a memory pool that is in use otherwise you risk hanging the system.
Include: #include <cyg/memalloc/kapi.h>
Returns: nothing
See Also: cyg_mempool_fix_create

cyg_mempool_fix_alloc
Name: cyg_mempool_fix_alloc ( ) - allocate a fixed sized block of memory with no timeout
Synopsis:
void *cyg_mempool_fix_alloc
(
  cyg_handle_t fixpool /* fixed sized memory pool to allocate from  */
)
Description: This allocates a fixed sized block of memory from a memory pool. The alignment will be at least on a four byte boundary. If memory is not available this call will block the calling task until there is enough memory to fulfill the request.
Include: #include <cyg/memalloc/kapi.h>
Returns: a pointer to the new memory, or NULL if the memory could not be allocated.
See Also: cyg_mempool_fix_timed_alloc, cyg_mempool_fix_try_alloc, cyg_mempool_fix_free, cyg_mempool_fix_waiting, cyg_mempool_fix_get_info

cyg_mempool_fix_timed_alloc
Name: cyg_mempool_fix_timed_alloc ( ) - allocate a fixed sized block of memory with timeout
Synopsis:
void *cyg_mempool_fix_timed_alloc
(
  cyg_handle_t     fixpool, /* fixed memory pool to allocate from */
  cyg_tick_count_t abstime  /* absolute timeout value             */
)
Description: This allocates a fixed sized block of memory from a memory pool. The alignment will be at least on a four byte boundary. If memory is not available this call will block the calling task until there is enough memory to fulfill the request or the system time reaches abstime.
Include: #include <cyg/memalloc/kapi.h>
Returns: a pointer to the new memory, or NULL if the timeout was reached.
See Also: cyg_mempool_fix_alloc, cyg_mempool_fix_try_alloc, cyg_mempool_fix_free, cyg_mempool_fix_waiting, cyg_mempool_fix_get_info

cyg_mempool_fix_try_alloc
Name: cyg_mempool_fix_try_alloc ( ) - allocate a fixed sized block of memory, don't block
Synopsis:
void *cyg_mempool_fix_try_alloc
(
  cyg_handle_t fixpool /* fixed memory pool to allocate from */
)
Description: This allocates a fixed sized block of memory from a memory pool. The alignment will be at least on a four byte boundary. If memory is not available this call will return NULL immediately.
Include: #include <cyg/memalloc/kapi.h>
Returns: a pointer to the new memory, or NULL if the memory could not be allocated.
See Also: cyg_mempool_fix_alloc, cyg_mempool_fix_timed_alloc, cyg_mempool_fix_free, cyg_mempool_fix_waiting, cyg_mempool_fix_get_info

cyg_mempool_fix_free
Name: cyg_mempool_fix_free ( ) - free a block of memory allocated from a fixed sized pool
Synopsis:
void cyg_mempool_fix_free
(
  cyg_handle_t fixpool, /* pool memory was allocated from */
  void         *p       /* memory to return to pool       */
)
Description: This frees memory that was allocated from a fixed sized memory pool. Be certain that you allocate from and free to the same "fixpool". If you allocate from one "fixpool" and free to another the behavior is undefined.
Include: #include <cyg/memalloc/kapi.h>
Returns: nothing
See Also: cyg_mempool_fix_alloc, cyg_mempool_fix_timed_alloc, cyg_mempool_fix_try_alloc, cyg_mempool_fix_waiting, cyg_mempool_fix_get_info

cyg_mempool_fix_waiting
Name: cyg_mempool_fix_waiting ( ) - check to see if threads are waiting to allocate
Synopsis:
cyg_bool_t cyg_mempool_fix_waiting
(
  cyg_handle_t fixpool /* fixpool to check */
)
Description: This checks to see if any threads are being blocked waiting to allocate memory from a fixed sized pool.
Include: #include <cyg/memalloc/kapi.h>
Returns: "true" if threads are blocked, "false" otherwise.
See Also: cyg_mempool_fix_alloc, cyg_mempool_fix_timed_alloc, cyg_mempool_fix_try_alloc, cyg_mempool_fix_free

cyg_mempool_fix_get_info
Name: cyg_mempool_fix_get_info ( ) - get info on a fixed sized mempool
Synopsis:
void cyg_mempool_fix_get_info
(
  cyg_handle_t     fixpool, /* pool to get info on */
  cyg_mempool_info *info    /* receives info       */
)
Description: This returns information about a memory pool. The information that is returned is described by the structure: typedef struct { cyg_int32 totalmem; cyg_int32 freemem; void *base; cyg_int32 size; cyg_int32 blocksize; cyg_int32 maxfree;} cyg_mempool_info;
Include: #include <cyg/memalloc/kapi.h>
Returns: nothing
See Also: cyg_mempool_fix_create