RTEMS Logo

RTEMS 4.6.1 On-Line Library


Fixed Block Manager cre_mpf - Create Fixed-Size Memorypool

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

10.4.1: cre_mpf - Create Fixed-Size Memorypool

CALLING SEQUENCE:

ER cre_mpf(
  ID mpfid,
  T_CMPF *pk_cmpf
);

STATUS CODES:

E_OK - Normal Completion

E_NOMEM - Insufficient memory (Memory for control block and/or for memorypool cannot be allocated)

E_ID - Invalid ID number (mpfid was invalid or could not be used)

E_RSATR - Reserved attribute (mpfatr was invalid or could not be used)

E_OBJ - Invalid object state (a memorypool of the same ID already exists)

E_OACV - Object access violation (A mpfid less than -4 was specified from a user task. This is implementation dependent.)

E_PAR - Parameter error (pk_cmpf is invalid or mpfsz and/or blfsz is negative or invalid)

DESCRIPTION:

This system call creates a fixed-size memorypool having the ID number specified by mpfid. Specifically, a memory area of a size based on values of mpfcnt and blfsz is reserved for use as a memorypool. A control block for the memorypool being created is also allocated. The get_blf system call specifying the memorypool created by this call can be issued to allocate memory blocks of the size given by blfsz (in bytes).

NOTES:

The memory area required for creating memorypools and for allocating control blocks for each object is allocated while system initialization. Associated parameters are therefore specified at system configuration.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2004 OAR Corporation