changes memory allocation for stream buffer