change buff memory allocation