Currently there are two memory pool implementations in ES:
- cfe_es_cds_mempool.c
- cfe_esmempool.c
These two are very similar except that the CDS uses offsets rather than direct pointers, and it calls into the PSP to perform actual read/write functions. It would not be very hard to consolidate these into a single implementation.
Each implementation consumes about 4-5kB of code/data space so this consolidation would make ES a little smaller in addition to making it cleaner.