02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

cluster size must be a power of two. Common cluster sizes for this style of memory<br />

pool are 64, 128, 256, 512, 1024 and 2048 bytes. See Figure H-5.<br />

Figure H-5<br />

A Protocol Memory Pool<br />

Memory Pool for a Protocol Stack<br />

Pool of mBlks<br />

mBlk mBlk mBlk<br />

mBlk mBlk mBlk<br />

mBlk mBlk mBlk<br />

mBlk mBlk ...<br />

Pool of Clusters<br />

64 64 64<br />

64 64 64<br />

64 64 64<br />

64 64 ...<br />

Pool of clBlks<br />

clBlk clBlk clBlk<br />

clBlk clBlk clBlk<br />

clBlk clBlk clBlk<br />

clBlk clBlk ...<br />

Pool of Clusters<br />

128 128 128<br />

128 128 128<br />

128 128 128<br />

128 128 ...<br />

Pool of Clusters<br />

...<br />

By contrast, a memory pool intended for an END typically contains only one<br />

cluster pool (in addition to the mBlk pools and clBlk pools), and the cluster size is<br />

not limited to a power of two. Thus, you are free to choose whatever cluster size is<br />

most convenient, which is typically something close to the MTU of the network.<br />

For example, in the Lance Ethernet END, the cluster size is 1520 bytes, which is the<br />

Ethernet MTU plus some slack. See Figure H-6.<br />

NOTE: It is recommended that there be at least a 3:1 ratio of mBlks to clusters.<br />

Figure H-6<br />

An END Memory Pool<br />

Memory Pool for an END<br />

Pool of mBlks<br />

mBlk mBlk mBlk<br />

mBlk mBlk mBlk<br />

mBlk mBlk mBlk<br />

mBlk mBlk ...<br />

Pool of clBlks<br />

clBlk clBlk clBlk<br />

clBlk clBlk clBlk<br />

clBlk clBlk clBlk<br />

clBlk clBlk ...<br />

Pool of Clusters<br />

1520 1520 1520<br />

1520 1520 1520<br />

1520 1520 1520<br />

1520 1520 ...<br />

278

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!