Rework pico memory allocation