Added setup functions to setup memory sizes

This enables the setup of TX/RX memory to accommodate other sizes than the default 2K.