- 51 -
4.1.10
Variable-size Memory Pool Management Function
A variable-size memory pool refers to the one in which a memory block of any desired size can be acquired from the mem-
ory pool. The MR100 permits one of the following two memory pool management methods to be selected before the mem-
ory pool is used.
1. Normal block method
2. Small
block
method
Each of these methods are explained below.
[[Normal Block Method]]
The technique that allows you to arbitrary define the size of memory block acquirable from the memory pool is termed Va-
riable-size scheme. The MR100 manages memory in terms of four fixed-size memory block sizes.
The MR100 calculates the size of individual blocks based on the maximum memory block size to be acquired. You specify
the maximum memory block size using the configuration file.
•
Equation for calculating four kinds of block sizes
a = (((max_(X-1))/ X
×
8)+1)
×
8
b = a
×
2
c = a
×
4
d = a
×
8
max_memsize: the value specified in the configuration file
X: data size for block control (8 byte)
•
Example of a configuration file
variable_memorypool[]{
max_memsize
= 400; <---- Maximum size
heap_size
= 5000;
};
If a variable-size memory pool is defined as shown above, the four kinds of fixed length block sizes are obtained from the
define value of max_memsize as 56, 112, 224 and 448, respectively. Furthermore, the MR100 calculates the memory re-
quested by the user based on a specified size to select the appropriate size from the four kinds of fixed length block sizes as
it allocates the requested memory. In no event will a memory block other than these four kinds of size be allocated.
[[Small block method]]
Unlike the normal block method where memory is managed in four kinds of fixed length block sizes, the small block me-
thod manages memory in 12 kinds of fixed length block sizes. Since the block sizes in this method are prefixed as shown
below, there is no need to specify a maximum size during configuration as in the normal block method.
The block sizes managed by the small block method are the following 12, beginning with the smallest:
24 bytes, 56 bytes, 120 bytes, 248 bytes, 504 bytes, 1,016 bytes, 2,040 bytes, 4,088 bytes, 8,184 byte, 16,376 bytes, 32,760
bytes and 65,528 bytes.
Содержание Emulator System M3T-MR100
Страница 3: ...M3T MR100 4 V 1 00 User s Manual User s Manual Rev 1 00 2007 09 Real time OS for R32C 100 Series...
Страница 6: ......
Страница 14: ......
Страница 16: ...xii...
Страница 18: ......
Страница 78: ......
Страница 242: ......
Страница 269: ...253 235 entry_address alm2 236 name ID_alm2 237 exinf 0x12345678 238 239 240 241 242 End of Configuration 243...
Страница 279: ...263...
Страница 290: ......
Страница 294: ......
Страница 304: ...288...
Страница 306: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M3T MR100 4 V 1 00 REJ10J1523 0100 User s Manual...