eCosTM Reference Manual
Prev | Chapter 18. Package: eCos uITRON Compatibility Layer | Next

# Component: Variable-Size Memorypools

#### Macro name

CYGPKG_UITRON_MEMPOOLVAR

#### Type

Boolean

#### Description

uITRON supports memory pools for dynamic, task-safe memory allocation. Two kinds are supported, fixed-size and variable-size. There may be multiple of each type of pool, each with differing characteristics. This option controls whether there are any variable-size memorypools in the system. A variable-size memorypool allocates blocks of memory of any size requested, resources permitting.

## Option: Number of variable-size memory pools

#### Macro name

CYGNUM_UITRON_MEMPOOLVAR

#### Type

Count

#### Description

The number of uITRON Variable-Size Memorypools present in the system. Valid Variable-Size Memorypool IDs will range from 1 to this value.

## Component: Support create and delete

#### Macro name

CYGPKG_UITRON_MEMPOOLVAR_CREATE_DELETE

#### Type

Boolean

#### Description

Support variable-size memory pool create and delete operations (cre_mpl, del_mpl). Otherwise all variable-size mempools are created, up to the number specified above.

### Option: Number of variable-size mempools created initially

#### Macro name

CYGNUM_UITRON_MEMPOOLVAR_INITIALLY

#### Type

Count

#### Description

The number of variable-size mempools initially created. This number should not be more than the number of variable mempools in the system, though setting it to a large value to mean "all" is acceptable. Initially, only variable mempools numbered from 1 to this number exist; higher numbered ones must be created before use. All mempools must be initialized to tell the system what memory to use for each pool.

## Option: Externs for initialization

#### Macro name

CYGDAT_UITRON_MEMPOOLVAR_EXTERNS

#### Type

Multiline

#### Description

Variable mempool initializers may refer to external objects such as memory for the pool to manage. Use this option to define or declare any external objects needed by the pool"s static initializer below. Example: create some memory for a mempool using "static char vpool1[2000];" to set up a chunk of memory of 2000 bytes. Note: this option is invoked in the "outermost" context of C++ source, where global/static objects are created; it should contain valid, self-contained, C++ source.

## Option: Static initializers

#### Macro name

CYGDAT_UITRON_MEMPOOLVAR_INITIALIZERS

#### Type

Multiline

#### Description

Variable block memory pools should be statically initialized: enter a list of initializers separated by commas, one per line. An initializer is "CYG_UIT_MEMPOOLVAR(ADDR,SIZE)" where addr is the address of memory to manage, and size is the total size of that memory. If create and delete operations are supported, initializers of the form "CYG_UIT_MEMPOOLVAR_NOEXS(ADDR,SIZE)" should be used for pools which are not initially created, to tell the system what memory to use for each pool. Note: this option is invoked in the context of a C++ array initializer, between curly brackets. Ensure that the number of initializers here exactly matches the total number of variable pools specified.

Prev | Home | Next
Component: Fixed-Size Memorypools | Up | Component: Alarm Handlers