Everything

13.4.6 Fixed-sized memory pool information

Define the following items as fixed-sized memory pool information:
The number of fixed-sized memory pool information items that can be specified is defined as being within the range of 0 to 127.
The following shows the fixed-sized memory pool information format.
 CRE_MPF ( mpfid, { mpfatr, blkcnt, blksz[:sec_nam], mpf } );

The items constituting the fixed-sized memory pool information are as follows.
1 ) Fixed-sized memory pool name: mpfid
Specifies the fixed-sized memory pool name.
An object name can be specified for mpfid.
Note The CF78V4 outputs to the system information header file the correspondence between the fixed-sized memory pool names and IDs, in the following format. Consequently, fixed-sized memory pool names can be used in the place of IDs by including the relevant system information header file using the processing program.
[ Output format to system information header file (for C) ]
 #define mpfid   ID

[ Output format to system information header file (for assembly language) ]
 mpfid   .EQU    ID

2 ) Attribute (queuing method): mpfatr
Specifies the attribute (queuing method) of the fixed-sized memory pool.
The keywords that can be specified for mpfatr are TA_TFIFO.
[ Queuing method ]
TA_TFIFO: If a memory block could not be acquired (no available memory blocks exist) when get_mpf or tget_mpf is issued, the task is queued to the fixed-sized memory pool wait queue in the order of memory block acquisition request.
3 ) Total number of memory blocks: blkcnt
Specifies the total number of memory blocks.
A value between 1 and 16383 can be specified for blkcnt.
4 ) Memory block size: blksz
Specifies the memory block size (in bytes).
A value between 4 and 65534, aligned to a 2-byte boundary, can be specified for blksz.
5 ) Section name: sec_nam
Specifies where the fixed-sized memory pool is to be allocated.
Values that can be specified for sec_nam are limited to kernel_work0, kernel_work1, kernel_work2, or kernel_work3.
[ Fixed-sized memory pool allocation section ]
kernel_work0: Allocates the fixed-sized memory pool to the .kernel_work0 section.
kernel_work1: Allocates the fixed-sized memory pool to the .kernel_work1 section.
kernel_work2: Allocates the fixed-sized memory pool to the .kernel_work2 section.
kernel_work3: Allocates the fixed-sized memory pool to the .kernel_work3 section.
Note If specification of seg_nam is omitted, the fixed-sized memory pool is allocated to the .kernel_work0 section.
6 ) System-reserved area: mpf
System-reserved area.
Values that can be specified for mpf are limited to NULL characters.