Use poolmem and allocate memory dynamically.